Revert "Replace uses of ioutil with io"
This reverts commit 19f1d6693e
.
This commit is contained in:
parent
056e55abbb
commit
90518a01a8
@ -2,6 +2,7 @@ package gemini
|
||||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@ -91,7 +92,7 @@ func TestReadWriteResponse(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
t.Logf("%#v", test.Raw)
|
||||
resp, err := ReadResponse(io.NopCloser(strings.NewReader(test.Raw)))
|
||||
resp, err := ReadResponse(ioutil.NopCloser(strings.NewReader(test.Raw)))
|
||||
if err != test.Err {
|
||||
t.Errorf("expected err = %v, got %v", test.Err, err)
|
||||
}
|
||||
@ -105,7 +106,7 @@ func TestReadWriteResponse(t *testing.T) {
|
||||
if resp.Meta != test.Meta {
|
||||
t.Errorf("expected meta = %s, got %s", test.Meta, resp.Meta)
|
||||
}
|
||||
b, _ := io.ReadAll(resp.Body)
|
||||
b, _ := ioutil.ReadAll(resp.Body)
|
||||
body := string(b)
|
||||
if body != test.Body {
|
||||
t.Errorf("expected body = %#v, got %#v", test.Body, body)
|
||||
|
Loading…
Reference in New Issue
Block a user