// Package errors implements functions to manipulate errors.
//
-// The New function creates errors whose only content is a text message.
+// The [New] function creates errors whose only content is a text message.
//
// An error e wraps another error if e's type has one of the methods
//
// indicates that e does not wrap any error. It is invalid for an
// Unwrap method to return an []error containing a nil error value.
//
-// An easy way to create wrapped errors is to call fmt.Errorf and apply
+// An easy way to create wrapped errors is to call [fmt.Errorf] and apply
// the %w verb to the error argument:
//
// wrapsErr := fmt.Errorf("... %w ...", ..., err, ...)
//
-// Successive unwrapping of an error creates a tree. The Is and As
+// Successive unwrapping of an error creates a tree. The [Is] and [As]
// functions inspect an error's tree by examining first the error
// itself followed by the tree of each of its children in turn
// (pre-order, depth-first traversal).
//
// if err == fs.ErrExist
//
-// because the former will succeed if err wraps fs.ErrExist.
+// because the former will succeed if err wraps [io/fs.ErrExist].
//
// As examines the tree of its first argument looking for an error that can be
// assigned to its second argument, which must be a pointer. If it succeeds, it
// fmt.Println(perr.Path)
// }
//
-// because the former will succeed if err wraps an *fs.PathError.
+// because the former will succeed if err wraps an [*io/fs.PathError].
package errors
// New returns an error that formats as the given text.
}
// ErrUnsupported indicates that a requested operation cannot be performed,
-// because it is unsupported. For example, a call to os.Link when using a
+// because it is unsupported. For example, a call to [os.Link] when using a
// file system that does not support hard links.
//
// Functions and methods should not return this error but should instead
//
// func (m MyError) Is(target error) bool { return target == fs.ErrExist }
//
-// then Is(MyError{}, fs.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. An Is method should only shallowly
// compare err and the target and not call Unwrap on either.
func Is(err, target error) bool {