Skip to content

Commit 20980dd

Browse files
committed
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.
1 parent eb6f2c2 commit 20980dd

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)