aboutsummaryrefslogtreecommitdiff
path: root/src/errors/errors.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-10-28 09:12:20 -0400
committerCherry Zhang <cherryyz@google.com>2020-10-28 09:12:20 -0400
commita16e30d162c1c7408db7821e7b9513cefa09c6ca (patch)
treeaf752ba9ba44c547df39bb0af9bff79f610ba9d5 /src/errors/errors.go
parent91e4d2d57bc341dd82c98247117114c851380aef (diff)
parentcf6cfba4d5358404dd890f6025e573a4b2156543 (diff)
downloadgo-dev.link.tar.gz
go-dev.link.zip
[dev.link] all: merge branch 'master' into dev.linkdev.link
Clean merge. Change-Id: Ia7b2808bc649790198d34c226a61d9e569084dc5
Diffstat (limited to 'src/errors/errors.go')
-rw-r--r--src/errors/errors.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/errors/errors.go b/src/errors/errors.go
index d923ad4b70..f2fabacd4e 100644
--- a/src/errors/errors.go
+++ b/src/errors/errors.go
@@ -27,30 +27,30 @@
// second. It reports whether it finds a match. It should be used in preference to
// simple equality checks:
//
-// if errors.Is(err, os.ErrExist)
+// if errors.Is(err, fs.ErrExist)
//
// is preferable to
//
-// if err == os.ErrExist
+// if err == fs.ErrExist
//
-// because the former will succeed if err wraps os.ErrExist.
+// because the former will succeed if err wraps fs.ErrExist.
//
// As unwraps its first argument sequentially looking for an error that can be
// assigned to its second argument, which must be a pointer. If it succeeds, it
// performs the assignment and returns true. Otherwise, it returns false. The form
//
-// var perr *os.PathError
+// var perr *fs.PathError
// if errors.As(err, &perr) {
// fmt.Println(perr.Path)
// }
//
// is preferable to
//
-// if perr, ok := err.(*os.PathError); ok {
+// if perr, ok := err.(*fs.PathError); ok {
// fmt.Println(perr.Path)
// }
//
-// because the former will succeed if err wraps an *os.PathError.
+// because the former will succeed if err wraps an *fs.PathError.
package errors
// New returns an error that formats as the given text.