From f3e9417dbfcd0dc2b4a02a1dfdeb75f1e636b692 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Sat, 11 May 2024 10:58:39 +0800 Subject: [PATCH] chore: remove refs to deprecated io/ioutil Signed-off-by: guoguangwu --- roundtripper_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roundtripper_test.go b/roundtripper_test.go index dcb02df..975d8b1 100644 --- a/roundtripper_test.go +++ b/roundtripper_test.go @@ -6,7 +6,7 @@ package retryablehttp import ( "context" "errors" - "io/ioutil" + "io" "net" "net/http" "net/http/httptest" @@ -88,7 +88,7 @@ func TestRoundTripper_RoundTrip(t *testing.T) { if resp.StatusCode != 200 { t.Fatalf("expected 200, got %d", resp.StatusCode) } - if v, err := ioutil.ReadAll(resp.Body); err != nil { + if v, err := io.ReadAll(resp.Body); err != nil { t.Fatal(err) } else if string(v) != "success!" { t.Fatalf("expected %q, got %q", "success!", v)