aboutsummaryrefslogtreecommitdiff
path: root/response_test.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-02-16 18:57:24 -0500
committerAdnan Maolood <[email protected]>2021-02-16 18:57:24 -0500
commit332dd253d017943480a22c63208c5eb0902261cd (patch)
tree0aa55678dcb3dd00b283690bbf60cc4f221590eb /response_test.go
parentfs: Replace FileSystem with io/fs.FS (diff)
downloadgo-gemini-332dd253d017943480a22c63208c5eb0902261cd.tar.xz
go-gemini-332dd253d017943480a22c63208c5eb0902261cd.zip
Replace uses of ioutil with io
Diffstat (limited to 'response_test.go')
-rw-r--r--response_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/response_test.go b/response_test.go
index abf71c0..ab2484f 100644
--- a/response_test.go
+++ b/response_test.go
@@ -2,7 +2,6 @@ package gemini
import (
"io"
- "io/ioutil"
"strings"
"testing"
)
@@ -81,7 +80,7 @@ func TestReadResponse(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)
}
@@ -95,7 +94,7 @@ func TestReadResponse(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)