From 7bb721b9384bdd196befeaed593b185f7f2a5589 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 7 Jul 2020 13:49:21 -0400 Subject: all: update references to symbols moved from os to io/fs The old os references are still valid, but update our code to reflect best practices and get used to the new locations. Code compiled with the bootstrap toolchain (cmd/asm, cmd/dist, cmd/compile, debug/elf) must remain Go 1.4-compatible and is excluded. For #41190. Change-Id: I8f9526977867c10a221e2f392f78d7dec073f1bd Reviewed-on: https://go-review.googlesource.com/c/go/+/243907 Trust: Russ Cox Run-TryBot: Russ Cox TryBot-Result: Go Bot Reviewed-by: Rob Pike --- src/errors/wrap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/errors/wrap.go') diff --git a/src/errors/wrap.go b/src/errors/wrap.go index b82ca34b46..7928fe673e 100644 --- a/src/errors/wrap.go +++ b/src/errors/wrap.go @@ -32,9 +32,9 @@ func Unwrap(err error) error { // An error type might provide an Is method so it can be treated as equivalent // to an existing error. For example, if MyError defines // -// func (m MyError) Is(target error) bool { return target == os.ErrExist } +// func (m MyError) Is(target error) bool { return target == fs.ErrExist } // -// then Is(MyError{}, os.ErrExist) returns true. See syscall.Errno.Is for +// then Is(MyError{}, fs.ErrExist) returns true. See syscall.Errno.Is for // an example in the standard library. func Is(err, target error) bool { if target == nil { -- cgit v1.3