golang/src/errors
Tobias Klauser af43932c20 errors: return early for Is(nil, ...)
If err is nil it wouldn't match any given target error except for nil,
so we can return early to speed up cases where Is is used without a
preceding err != nil check.

Change-Id: Ib33cff50453fe070f06871ce8074694c81ab787b
Reviewed-on: https://go-review.googlesource.com/c/go/+/576015
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2024-04-03 22:49:49 +00:00
..
errors.go errors: add available godoc link 2023-11-02 19:45:41 +00:00
errors_test.go errors: move example functions into example_test file 2023-01-20 21:55:10 +00:00
example_test.go errors: add a colon after Output to make the Example in the document display correctly 2023-08-16 02:08:40 +00:00
join.go errors: optimize *joinError's Error method for less allocation and faster execution 2023-07-31 18:37:32 +00:00
join_test.go errors: add test for Join 2022-10-17 21:48:12 +00:00
wrap.go errors: return early for Is(nil, ...) 2024-04-03 22:49:49 +00:00
wrap_test.go errors: return early for Is(nil, ...) 2024-04-03 22:49:49 +00:00