Skip to content

Commit

Permalink
all: update references to symbols moved from io/ioutil to io
Browse files Browse the repository at this point in the history
  • Loading branch information
KimMachineGun committed Nov 29, 2020
1 parent 4ce0a7c commit 0eb1e06
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion doc/articles/wiki/wiki_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package main_test
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
Expand Down Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion misc/android/go_android_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions misc/linkcheck/linkcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"errors"
"flag"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/net/http/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
3 changes: 1 addition & 2 deletions src/testing/fstest/testfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"fmt"
"io"
"io/fs"
"io/ioutil"
"path"
"reflect"
"sort"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0eb1e06

Please sign in to comment.