Skip to content

Commit 0eb1e06

Browse files
committed
all: update references to symbols moved from io/ioutil to io
1 parent 4ce0a7c commit 0eb1e06

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

doc/articles/wiki/wiki_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package main_test
77
import (
88
"bytes"
99
"fmt"
10+
"io"
1011
"io/ioutil"
1112
"net/http"
1213
"os"
@@ -141,7 +142,7 @@ func responseMustMatchFile(t *testing.T, r *http.Response, filename string) {
141142
t.Helper()
142143

143144
defer r.Body.Close()
144-
body, err := ioutil.ReadAll(r.Body)
145+
body, err := io.ReadAll(r.Body)
145146
if err != nil {
146147
t.Fatal(err)
147148
}

misc/android/go_android_exec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ func adbCopyGoroot() error {
276276
if err := syscall.Flock(int(stat.Fd()), syscall.LOCK_EX); err != nil {
277277
return err
278278
}
279-
s, err := ioutil.ReadAll(stat)
279+
s, err := io.ReadAll(stat)
280280
if err != nil {
281281
return err
282282
}

misc/linkcheck/linkcheck.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"errors"
1212
"flag"
1313
"fmt"
14-
"io/ioutil"
14+
"io"
1515
"log"
1616
"net/http"
1717
"os"
@@ -144,7 +144,7 @@ func doCrawl(url string) error {
144144
if res.StatusCode != 200 {
145145
return errors.New(res.Status)
146146
}
147-
slurp, err := ioutil.ReadAll(res.Body)
147+
slurp, err := io.ReadAll(res.Body)
148148
res.Body.Close()
149149
if err != nil {
150150
log.Fatalf("Error reading %s body: %v", url, err)

src/net/http/fs_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ func TestServeIndexHtml(t *testing.T) {
593593
if err != nil {
594594
t.Fatal(err)
595595
}
596-
b, err := ioutil.ReadAll(res.Body)
596+
b, err := io.ReadAll(res.Body)
597597
if err != nil {
598598
t.Fatal("reading Body:", err)
599599
}

src/testing/fstest/testfs.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"fmt"
1111
"io"
1212
"io/fs"
13-
"io/ioutil"
1413
"path"
1514
"reflect"
1615
"sort"
@@ -460,7 +459,7 @@ func (t *fsTester) checkFile(file string) {
460459
return
461460
}
462461

463-
data, err := ioutil.ReadAll(f)
462+
data, err := io.ReadAll(f)
464463
if err != nil {
465464
f.Close()
466465
t.errorf("%s: Open+ReadAll: %v", file, err)

0 commit comments

Comments
 (0)