Remove calls to Go's deprecated "io/ioutil"

This commit is contained in:
Nigel Tao committed 2021-08-22 11:17:34 +10:00
1 parent 788479dd64
commit 226c476994
31 files changed
+73 -93

No files matched your search

+3 -3
View File
@@ -16,7 +16,7 @@ package cgozstd
import (
"bytes"
"io/ioutil"
"io"
"strings"
"testing"
)
@@ -87,7 +87,7 @@ func TestRoundTrip(tt *testing.T) {
r.Close()
tt.Fatalf("i=%d: Reset: %v", i, err)
}
gotBytes, err := ioutil.ReadAll(r)
gotBytes, err := io.ReadAll(r)
if err != nil {
r.Close()
tt.Fatalf("i=%d: ReadAll: %v", i, err)
@@ -149,7 +149,7 @@ func TestDictionary(tt *testing.T) {
r.Close()
tt.Fatalf("%s: Reset: %v", name, err)
}
gotBytes, err := ioutil.ReadAll(r)
gotBytes, err := io.ReadAll(r)
if err != nil {
r.Close()
tt.Fatalf("%s: ReadAll: %v", name, err)