aboutsummaryrefslogtreecommitdiff
path: root/src/strings/reader_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings/reader_test.go')
-rw-r--r--src/strings/reader_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/strings/reader_test.go b/src/strings/reader_test.go
index a4c211d699..5adea6f7ab 100644
--- a/src/strings/reader_test.go
+++ b/src/strings/reader_test.go
@@ -8,7 +8,6 @@ import (
"bytes"
"fmt"
"io"
- "io/ioutil"
"strings"
"sync"
"testing"
@@ -162,7 +161,7 @@ func TestWriteTo(t *testing.T) {
// tests that Len is affected by reads, but Size is not.
func TestReaderLenSize(t *testing.T) {
r := strings.NewReader("abc")
- io.CopyN(ioutil.Discard, r, 1)
+ io.CopyN(io.Discard, r, 1)
if r.Len() != 2 {
t.Errorf("Len = %d; want 2", r.Len())
}
@@ -182,7 +181,7 @@ func TestReaderReset(t *testing.T) {
if err := r.UnreadRune(); err == nil {
t.Errorf("UnreadRune: expected error, got nil")
}
- buf, err := ioutil.ReadAll(r)
+ buf, err := io.ReadAll(r)
if err != nil {
t.Errorf("ReadAll: unexpected error: %v", err)
}
@@ -228,7 +227,7 @@ func TestReaderZero(t *testing.T) {
t.Errorf("UnreadRune: got nil, want error")
}
- if n, err := (&strings.Reader{}).WriteTo(ioutil.Discard); n != 0 || err != nil {
+ if n, err := (&strings.Reader{}).WriteTo(io.Discard); n != 0 || err != nil {
t.Errorf("WriteTo: got %d, %v; want 0, nil", n, err)
}
}