Skip to content

Commit 1d0f5c4

Browse files
matttproudneild
authored andcommitted
errors: reference Go 1.13 article about errors
This commit amends package errors' documentation to include a reference to the https://go.dev/blog/go1.13-errors blog article. The motivation is multi-fold, but chiefly the article includes good information about error philosophy (e.g., when to wrap), and developers who have come to Go in the intervening five years are likely not have seen this article at all given the nature of blog publishing and post fanfare. The material deserves a promotion in visibility. Change-Id: Ia6f8307784521dd59de3a3d638dbc0a7fcd445e6 GitHub-Last-Rev: 20980dd GitHub-Pull-Request: #69698 Reviewed-on: https://go-review.googlesource.com/c/go/+/616341 Reviewed-by: Jonathan Amsterdam <[email protected]> Reviewed-by: Damien Neil <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent 846fc63 commit 1d0f5c4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/errors/errors.go

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
// itself followed by the tree of each of its children in turn
2727
// (pre-order, depth-first traversal).
2828
//
29+
// See https://go.dev/blog/go1.13-errors for a deeper discussion of the
30+
// philosophy of wrapping and when to wrap.
31+
//
2932
// [Is] examines the tree of its first argument looking for an error that
3033
// matches the second. It reports whether it finds a match. It should be
3134
// used in preference to simple equality checks:

0 commit comments

Comments
 (0)