-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xerrors: make As match on assignability
Change As to consider assignability rather than type equivalence, allowing it to convert an error to an interface type. e.g., var to interface{ Timeout() bool } if errors.As(err, &to) && to.Timeout() { ... }j Change-Id: Ia3ecaefb6c27f878f81f1d467b07b69fee9db976 Reviewed-on: https://go-review.googlesource.com/c/161017 Reviewed-by: Marcel van Lohuizen <[email protected]>
- Loading branch information
Showing
2 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters