aboutsummaryrefslogtreecommitdiff
path: root/src/errors/errors.go
diff options
context:
space:
mode:
authorOlivier Mengué <olivier.mengue@gmail.com>2023-05-23 16:51:04 +0200
committerGopher Robot <gobot@golang.org>2023-05-25 13:20:16 +0000
commitfc5c590d8dac4edb7b87b6c943948033a3920266 (patch)
treede78d9330d8da805a403ea8d71662e231b6c5159 /src/errors/errors.go
parent055c186f53493da473c888869ad468861ba25f1a (diff)
downloadgo-fc5c590d8dac4edb7b87b6c943948033a3920266.tar.xz
errors: add godoc links
Change-Id: I766e656e6b967290d692313ea1391878fc21c92d Reviewed-on: https://go-review.googlesource.com/c/go/+/497375 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/errors/errors.go')
-rw-r--r--src/errors/errors.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/errors/errors.go b/src/errors/errors.go
index 26db2d2bbf..41397774d3 100644
--- a/src/errors/errors.go
+++ b/src/errors/errors.go
@@ -4,7 +4,7 @@
// 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
//
@@ -16,12 +16,12 @@
// 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).
@@ -36,7 +36,7 @@
//
// 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
@@ -53,7 +53,7 @@
// 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.
@@ -72,7 +72,7 @@ func (e *errorString) Error() string {
}
// 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