all: replace uses of ioutil with io and os (#24869)

This commit is contained in:
Håvard Anda Estensen
2022-05-16 11:59:35 +02:00
committed by GitHub
parent 330e53fbb9
commit 07508ac0e9
97 changed files with 203 additions and 257 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ package graphql
import (
"fmt"
"io/ioutil"
"io"
"math/big"
"net/http"
"strings"
@@ -146,7 +146,7 @@ func TestGraphQLBlockSerialization(t *testing.T) {
if err != nil {
t.Fatalf("could not post: %v", err)
}
bodyBytes, err := ioutil.ReadAll(resp.Body)
bodyBytes, err := io.ReadAll(resp.Body)
if err != nil {
t.Fatalf("could not read from response body: %v", err)
}
@@ -182,7 +182,7 @@ func TestGraphQLBlockSerializationEIP2718(t *testing.T) {
if err != nil {
t.Fatalf("could not post: %v", err)
}
bodyBytes, err := ioutil.ReadAll(resp.Body)
bodyBytes, err := io.ReadAll(resp.Body)
if err != nil {
t.Fatalf("could not read from response body: %v", err)
}