2 Commits

Author SHA1 Message Date
Adnan Maolood
dbbef1fb6d Revert "Require Go 1.16"
This reverts commit 0e87d64ffc.
2021-03-23 22:05:12 -04:00
Adnan Maolood
90518a01a8 Revert "Replace uses of ioutil with io"
This reverts commit 19f1d6693e.
2021-03-23 22:02:32 -04:00
3 changed files with 6 additions and 3 deletions

2
fs.go
View File

@@ -1,3 +1,5 @@
// +build go1.16
package gemini
import (

2
go.mod
View File

@@ -1,5 +1,5 @@
module git.sr.ht/~adnano/go-gemini
go 1.16
go 1.15
require golang.org/x/net v0.0.0-20210119194325-5f4716e94777

View File

@@ -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)