diff --git a/httptransport/discoveryhandler_test.go b/httptransport/discoveryhandler_test.go index 50c28f5dd4..29f9c5ee93 100644 --- a/httptransport/discoveryhandler_test.go +++ b/httptransport/discoveryhandler_test.go @@ -4,7 +4,7 @@ import ( "bytes" "context" "encoding/json" - "io/ioutil" + "io" "net/http" "net/http/httptest" "os" @@ -35,7 +35,7 @@ func TestDiscoveryEndpoint(t *testing.T) { t.Errorf("got: %q, want: %q", got, want) } - buf, err := ioutil.ReadAll(resp.Body) + buf, err := io.ReadAll(resp.Body) if err != nil { t.Fatalf("failed to ready response body: %v", err) } diff --git a/httptransport/matcher_v1_test.go b/httptransport/matcher_v1_test.go index 6e4ac76f83..6e3d16a6f3 100644 --- a/httptransport/matcher_v1_test.go +++ b/httptransport/matcher_v1_test.go @@ -3,7 +3,7 @@ package httptransport import ( "context" "fmt" - "io/ioutil" + "io" "net" "net/http" "net/http/httptest" @@ -80,7 +80,7 @@ func testUpdateDiffMatcher(t *testing.T) { defer resp.Body.Close() got, want := resp.StatusCode, http.StatusOK if got != want { - body, err := ioutil.ReadAll(resp.Body) + body, err := io.ReadAll(resp.Body) if err != nil { t.Log("could not read body of unexpected response") }