diff --git a/src/os/error.go b/src/os/error.go index 704a6fb29e3..fe8f2a84466 100644 --- a/src/os/error.go +++ b/src/os/error.go @@ -78,7 +78,7 @@ func NewSyscallError(syscall string, err error) error { // well as some syscall errors. // // This function predates errors.Is. It only supports errors returned by -// the os package. New code should use errors.Is(err, os.ErrExist). +// the os package. New code should use errors.Is(err, fs.ErrExist). func IsExist(err error) bool { return underlyingErrorIs(err, ErrExist) } @@ -88,7 +88,7 @@ func IsExist(err error) bool { // ErrNotExist as well as some syscall errors. // // This function predates errors.Is. It only supports errors returned by -// the os package. New code should use errors.Is(err, os.ErrNotExist). +// the os package. New code should use errors.Is(err, fs.ErrNotExist). func IsNotExist(err error) bool { return underlyingErrorIs(err, ErrNotExist) } @@ -98,7 +98,7 @@ func IsNotExist(err error) bool { // as some syscall errors. // // This function predates errors.Is. It only supports errors returned by -// the os package. New code should use errors.Is(err, os.ErrPermission). +// the os package. New code should use errors.Is(err, fs.ErrPermission). func IsPermission(err error) bool { return underlyingErrorIs(err, ErrPermission) }