From 7d8d9c354311e554fa49e90c13dffa9d74e6b180 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Sat, 10 Dec 2022 16:55:06 +0800 Subject: [PATCH] fix: fix lint issue --- netutil/http_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/netutil/http_test.go b/netutil/http_test.go index 0f230c4..5a48828 100644 --- a/netutil/http_test.go +++ b/netutil/http_test.go @@ -2,7 +2,7 @@ package netutil import ( "encoding/json" - "io/ioutil" + "io" "log" "net/url" "testing" @@ -21,7 +21,7 @@ func TestHttpGet(t *testing.T) { log.Fatal(err) } - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) t.Log("response: ", resp.StatusCode, string(body)) } @@ -41,7 +41,7 @@ func TestHttpPost(t *testing.T) { if err != nil { log.Fatal(err) } - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) t.Log("response: ", resp.StatusCode, string(body)) } @@ -64,7 +64,7 @@ func TestHttpPostFormData(t *testing.T) { if err != nil { log.Fatal(err) } - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) t.Log("response: ", resp.StatusCode, string(body)) } @@ -85,7 +85,7 @@ func TestHttpPut(t *testing.T) { if err != nil { log.Fatal(err) } - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) t.Log("response: ", resp.StatusCode, string(body)) } @@ -106,7 +106,7 @@ func TestHttpPatch(t *testing.T) { if err != nil { log.Fatal(err) } - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) t.Log("response: ", resp.StatusCode, string(body)) } @@ -116,7 +116,7 @@ func TestHttpDelete(t *testing.T) { if err != nil { log.Fatal(err) } - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) t.Log("response: ", resp.StatusCode, string(body)) }