]> Cypherpunks repositories - gostls13.git/commitdiff
errors: reference Go 1.13 article about errors
authorMatt T. Proud <matt.proud@gmail.com>
Sat, 28 Sep 2024 14:25:38 +0000 (14:25 +0000)
committerDamien Neil <dneil@google.com>
Mon, 30 Sep 2024 17:37:38 +0000 (17:37 +0000)
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: 20980dd5070cde495ebb08386ae7b4cd78ccc612
GitHub-Pull-Request: golang/go#69698
Reviewed-on: https://go-review.googlesource.com/c/go/+/616341
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/errors/errors.go

index 9e3860aaa9946fb526ee7de12b9b735511e3e3b3..5059be12ed441f4a9ed2856106a85ee784f9ba79 100644 (file)
@@ -26,6 +26,9 @@
 // itself followed by the tree of each of its children in turn
 // (pre-order, depth-first traversal).
 //
+// See https://go.dev/blog/go1.13-errors for a deeper discussion of the
+// philosophy of wrapping and when to wrap.
+//
 // [Is] examines the tree of its first argument looking for an error that
 // matches the second. It reports whether it finds a match. It should be
 // used in preference to simple equality checks: