diff --git a/doc/articles/wiki/wiki_test.go b/doc/articles/wiki/wiki_test.go index 1d976fd77e5cd5..9c588fdf1e0f27 100644 --- a/doc/articles/wiki/wiki_test.go +++ b/doc/articles/wiki/wiki_test.go @@ -7,6 +7,7 @@ package main_test import ( "bytes" "fmt" + "io" "io/ioutil" "net/http" "os" @@ -141,7 +142,7 @@ func responseMustMatchFile(t *testing.T, r *http.Response, filename string) { t.Helper() defer r.Body.Close() - body, err := ioutil.ReadAll(r.Body) + body, err := io.ReadAll(r.Body) if err != nil { t.Fatal(err) } diff --git a/misc/android/go_android_exec.go b/misc/android/go_android_exec.go index 7aa7fe56fc5e04..35b160fc9f0b04 100644 --- a/misc/android/go_android_exec.go +++ b/misc/android/go_android_exec.go @@ -276,7 +276,7 @@ func adbCopyGoroot() error { if err := syscall.Flock(int(stat.Fd()), syscall.LOCK_EX); err != nil { return err } - s, err := ioutil.ReadAll(stat) + s, err := io.ReadAll(stat) if err != nil { return err } diff --git a/misc/linkcheck/linkcheck.go b/misc/linkcheck/linkcheck.go index d9bfd2f767eb19..570b430da4f1cb 100644 --- a/misc/linkcheck/linkcheck.go +++ b/misc/linkcheck/linkcheck.go @@ -11,7 +11,7 @@ import ( "errors" "flag" "fmt" - "io/ioutil" + "io" "log" "net/http" "os" @@ -144,7 +144,7 @@ func doCrawl(url string) error { if res.StatusCode != 200 { return errors.New(res.Status) } - slurp, err := ioutil.ReadAll(res.Body) + slurp, err := io.ReadAll(res.Body) res.Body.Close() if err != nil { log.Fatalf("Error reading %s body: %v", url, err) diff --git a/src/net/http/fs_test.go b/src/net/http/fs_test.go index 2e4751114de15e..45018e5d3b3083 100644 --- a/src/net/http/fs_test.go +++ b/src/net/http/fs_test.go @@ -593,7 +593,7 @@ func TestServeIndexHtml(t *testing.T) { if err != nil { t.Fatal(err) } - b, err := ioutil.ReadAll(res.Body) + b, err := io.ReadAll(res.Body) if err != nil { t.Fatal("reading Body:", err) } diff --git a/src/testing/fstest/testfs.go b/src/testing/fstest/testfs.go index 4912a271b26adc..60be802d527bf7 100644 --- a/src/testing/fstest/testfs.go +++ b/src/testing/fstest/testfs.go @@ -10,7 +10,6 @@ import ( "fmt" "io" "io/fs" - "io/ioutil" "path" "reflect" "sort" @@ -460,7 +459,7 @@ func (t *fsTester) checkFile(file string) { return } - data, err := ioutil.ReadAll(f) + data, err := io.ReadAll(f) if err != nil { f.Close() t.errorf("%s: Open+ReadAll: %v", file, err)