aboutsummaryrefslogtreecommitdiff
path: root/src/errors/wrap.go
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2023-10-13 14:59:10 +0800
committerCherry Mui <cherryyz@google.com>2023-11-02 19:45:41 +0000
commit925a4d93dcc958ee9250bcc213baa0fc7bd892ae (patch)
tree896d184ba636c248c7abb4945cf6433182021e99 /src/errors/wrap.go
parentf31a030e90d50ac7245bbae77f5598ad99411b0d (diff)
downloadgo-925a4d93dcc958ee9250bcc213baa0fc7bd892ae.tar.xz
errors: add available godoc link
Change-Id: Ie86493ebad3c3d7ea914754451985d7ee3e8e270 Reviewed-on: https://go-review.googlesource.com/c/go/+/535080 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: shuang cui <imcusg@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Diffstat (limited to 'src/errors/wrap.go')
-rw-r--r--src/errors/wrap.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/errors/wrap.go b/src/errors/wrap.go
index 756de6cc1c..e1cc466eea 100644
--- a/src/errors/wrap.go
+++ b/src/errors/wrap.go
@@ -27,7 +27,7 @@ func Unwrap(err error) error {
// Is reports whether any error in err's tree matches target.
//
// The tree consists of err itself, followed by the errors obtained by repeatedly
-// calling Unwrap. When err wraps multiple errors, Is examines err followed by a
+// calling [Unwrap]. When err wraps multiple errors, Is examines err followed by a
// depth-first traversal of its children.
//
// An error is considered to match a target if it is equal to that target or if
@@ -40,7 +40,7 @@ func Unwrap(err error) error {
//
// 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.
+// compare err and the target and not call [Unwrap] on either.
func Is(err, target error) bool {
if target == nil {
return err == target
@@ -81,7 +81,7 @@ func is(err, target error, targetComparable bool) bool {
// target to that error value and returns true. Otherwise, it returns false.
//
// The tree consists of err itself, followed by the errors obtained by repeatedly
-// calling Unwrap. When err wraps multiple errors, As examines err followed by a
+// calling [Unwrap]. When err wraps multiple errors, As examines err followed by a
// depth-first traversal of its children.
//
// An error matches target if the error's concrete value is assignable to the value