diff options
| author | Adnan Maolood <[email protected]> | 2021-02-24 11:10:20 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-24 11:11:10 -0500 |
| commit | 48c67bceadc51a7e4951d912225bb62698e3ee54 (patch) | |
| tree | b3e3f4fd131cd562076bb4b43dc7935e17b07f12 /response_test.go | |
| parent | fs: Remove build constraint (diff) | |
| download | go-gemini-48c67bceadc51a7e4951d912225bb62698e3ee54.tar.xz go-gemini-48c67bceadc51a7e4951d912225bb62698e3ee54.zip | |
Replace uses of ioutil with io
Diffstat (limited to 'response_test.go')
| -rw-r--r-- | response_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/response_test.go b/response_test.go index 5e3e4d2..430aa07 100644 --- a/response_test.go +++ b/response_test.go @@ -2,7 +2,6 @@ package gemini import ( "io" - "io/ioutil" "strings" "testing" ) @@ -83,7 +82,7 @@ func TestReadWriteResponse(t *testing.T) { for _, test := range tests { t.Logf("%#v", test.Raw) - resp, err := ReadResponse(ioutil.NopCloser(strings.NewReader(test.Raw))) + resp, err := ReadResponse(io.NopCloser(strings.NewReader(test.Raw))) if err != test.Err { t.Errorf("expected err = %v, got %v", test.Err, err) } @@ -97,7 +96,7 @@ func TestReadWriteResponse(t *testing.T) { if resp.meta != test.Meta { t.Errorf("expected meta = %s, got %s", test.Meta, resp.meta) } - b, _ := ioutil.ReadAll(resp.body) + b, _ := io.ReadAll(resp.body) body := string(b) if body != test.Body { t.Errorf("expected body = %#v, got %#v", test.Body, body) |