diff options
| author | Joshua Sing <joshua@hypera.dev> | 2023-11-19 14:29:24 +1100 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-01-25 17:04:12 +0000 |
| commit | 0e3f2836ef3e230ced34f5550aa937610e076531 (patch) | |
| tree | a1341a161f6592d1e3591394d6ee99037c4ac646 /git-codereview/gofmt_test.go | |
| parent | 8be3abfe097ddf04b28eec2783249d29b3a48dae (diff) | |
| download | go-x-review-0e3f2836ef3e230ced34f5550aa937610e076531.tar.xz | |
git-codereview: remove usage of io/ioutilv1.9.0
io/ioutil is now deprecated. Use non-deprecated equivalents.
Change-Id: Iad1cc9c14dbdad3a6f9ada25072bc194bace4081
Reviewed-on: https://go-review.googlesource.com/c/review/+/543615
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'git-codereview/gofmt_test.go')
| -rw-r--r-- | git-codereview/gofmt_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/git-codereview/gofmt_test.go b/git-codereview/gofmt_test.go index 81f82a4..de64760 100644 --- a/git-codereview/gofmt_test.go +++ b/git-codereview/gofmt_test.go @@ -6,7 +6,6 @@ package main import ( "fmt" - "io/ioutil" "os" "strings" "testing" @@ -222,7 +221,7 @@ func TestGofmtUnstaged(t *testing.T) { // Read files to make sure unstaged did not bleed into staged. for i, file := range allFiles { - if data, err := ioutil.ReadFile(gt.client + "/" + file); err != nil { + if data, err := os.ReadFile(gt.client + "/" + file); err != nil { t.Errorf("%v", err) } else if want := fixed[i%N]; string(data) != want { t.Errorf("%s: working tree = %q, want %q", file, string(data), want) |
