mirror of
https://github.com/golang/go
synced 2024-11-07 06:26:11 -07:00
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 <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
ddb648fdf6
commit
ed5ebd32b3
@ -78,7 +78,7 @@ func NewSyscallError(syscall string, err error) error {
|
|||||||
// well as some syscall errors.
|
// well as some syscall errors.
|
||||||
//
|
//
|
||||||
// This function predates errors.Is. It only supports errors returned by
|
// 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 {
|
func IsExist(err error) bool {
|
||||||
return underlyingErrorIs(err, ErrExist)
|
return underlyingErrorIs(err, ErrExist)
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ func IsExist(err error) bool {
|
|||||||
// ErrNotExist as well as some syscall errors.
|
// ErrNotExist as well as some syscall errors.
|
||||||
//
|
//
|
||||||
// This function predates errors.Is. It only supports errors returned by
|
// 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 {
|
func IsNotExist(err error) bool {
|
||||||
return underlyingErrorIs(err, ErrNotExist)
|
return underlyingErrorIs(err, ErrNotExist)
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ func IsNotExist(err error) bool {
|
|||||||
// as some syscall errors.
|
// as some syscall errors.
|
||||||
//
|
//
|
||||||
// This function predates errors.Is. It only supports errors returned by
|
// 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 {
|
func IsPermission(err error) bool {
|
||||||
return underlyingErrorIs(err, ErrPermission)
|
return underlyingErrorIs(err, ErrPermission)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user