1
0
mirror of https://github.com/golang/go synced 2024-11-26 07:57:57 -07:00

cmd/gofmt: remove impossible err!=nil conditional

Change-Id: Ife63c766cefc14d2f6bdd3c706f913b1b6f99949
GitHub-Last-Rev: 04e23349e6
GitHub-Pull-Request: golang/go#65929
Reviewed-on: https://go-review.googlesource.com/c/go/+/566099
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
guoguangwu 2024-02-25 10:15:17 +00:00 committed by Robert Griesemer
parent 51a2418f38
commit 0fefe417db

View File

@ -555,7 +555,7 @@ func backupFile(filename string, data []byte, perm fs.FileMode) (string, error)
if err == nil { if err == nil {
break break
} }
if err != nil && !os.IsExist(err) { if !os.IsExist(err) {
return "", err return "", err
} }
} }