Skip to content

Commit ed5ebd3

Browse files
committed
os: update some docs to reference fs.ErrFoo instead of os.ErrFoo
Change-Id: I8b771f407028406a6ec9a1f2500c806054961267 Reviewed-on: https://go-review.googlesource.com/c/go/+/313569 Trust: Brad Fitzpatrick <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent ddb648f commit ed5ebd3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/os/error.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func NewSyscallError(syscall string, err error) error {
7878
// well as some syscall errors.
7979
//
8080
// This function predates errors.Is. It only supports errors returned by
81-
// the os package. New code should use errors.Is(err, os.ErrExist).
81+
// the os package. New code should use errors.Is(err, fs.ErrExist).
8282
func IsExist(err error) bool {
8383
return underlyingErrorIs(err, ErrExist)
8484
}
@@ -88,7 +88,7 @@ func IsExist(err error) bool {
8888
// ErrNotExist as well as some syscall errors.
8989
//
9090
// This function predates errors.Is. It only supports errors returned by
91-
// the os package. New code should use errors.Is(err, os.ErrNotExist).
91+
// the os package. New code should use errors.Is(err, fs.ErrNotExist).
9292
func IsNotExist(err error) bool {
9393
return underlyingErrorIs(err, ErrNotExist)
9494
}
@@ -98,7 +98,7 @@ func IsNotExist(err error) bool {
9898
// as some syscall errors.
9999
//
100100
// This function predates errors.Is. It only supports errors returned by
101-
// the os package. New code should use errors.Is(err, os.ErrPermission).
101+
// the os package. New code should use errors.Is(err, fs.ErrPermission).
102102
func IsPermission(err error) bool {
103103
return underlyingErrorIs(err, ErrPermission)
104104
}

0 commit comments

Comments
 (0)