]> Cypherpunks repositories - gostls13.git/commit
errors: document that the target of Is must be comparable
authorDamien Neil <dneil@google.com>
Mon, 27 Oct 2025 19:27:12 +0000 (12:27 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 28 Oct 2025 15:30:47 +0000 (08:30 -0700)
commit12c8d14d947ba922e19e3360ce5decd2bb848257
tree035b327274fdb78c3f2a1bfb413a256d67acbe33
parent1f4d14e493516af6017ed9b467e7daf772752f98
errors: document that the target of Is must be comparable

If target is not comparable, then errors.Is(err, target) can panic.
(Put another way, if target == target panics, then Is can panic.)

Document that the target must be comparable.

For #74488

Change-Id: I694dc4c91a608b80f044f06dd1c6ac32b8e77c9c
Reviewed-on: https://go-review.googlesource.com/c/go/+/715440
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
TryBot-Bypass: Damien Neil <dneil@google.com>
src/errors/wrap.go