Revert "Replace uses of ioutil with io"
This reverts commit 48c67bcead
.
This commit is contained in:
parent
cbfbeb6c22
commit
1da23ba07b
@ -2,6 +2,7 @@ package gemini
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
"io/ioutil"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@ -82,7 +83,7 @@ func TestReadWriteResponse(t *testing.T) {
|
|||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
t.Logf("%#v", test.Raw)
|
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 {
|
if err != test.Err {
|
||||||
t.Errorf("expected err = %v, got %v", test.Err, err)
|
t.Errorf("expected err = %v, got %v", test.Err, err)
|
||||||
}
|
}
|
||||||
@ -96,7 +97,7 @@ func TestReadWriteResponse(t *testing.T) {
|
|||||||
if resp.meta != test.Meta {
|
if resp.meta != test.Meta {
|
||||||
t.Errorf("expected meta = %s, got %s", test.Meta, resp.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)
|
body := string(b)
|
||||||
if body != test.Body {
|
if body != test.Body {
|
||||||
t.Errorf("expected body = %#v, got %#v", test.Body, body)
|
t.Errorf("expected body = %#v, got %#v", test.Body, body)
|
||||||
|
Loading…
Reference in New Issue
Block a user