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/sync.go | |
| parent | 8be3abfe097ddf04b28eec2783249d29b3a48dae (diff) | |
| download | go-x-review-1.9.0.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/sync.go')
| -rw-r--r-- | git-codereview/sync.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/git-codereview/sync.go b/git-codereview/sync.go index 0555d67..db6650e 100644 --- a/git-codereview/sync.go +++ b/git-codereview/sync.go @@ -8,7 +8,6 @@ import ( "encoding/json" "flag" "fmt" - "io/ioutil" "os" "strings" ) @@ -107,7 +106,7 @@ func syncBranchStatusFile() string { } func readSyncBranchStatus() *syncBranchStatus { - data, err := ioutil.ReadFile(syncBranchStatusFile()) + data, err := os.ReadFile(syncBranchStatusFile()) if err != nil { dief("cannot sync-branch: reading status: %v", err) } @@ -124,7 +123,7 @@ func writeSyncBranchStatus(status *syncBranchStatus) { if err != nil { dief("cannot sync-branch: writing status: %v", err) } - if err := ioutil.WriteFile(syncBranchStatusFile(), js, 0666); err != nil { + if err := os.WriteFile(syncBranchStatusFile(), js, 0666); err != nil { dief("cannot sync-branch: writing status: %v", err) } } |
