Is determines whether one of the causes of the given error or any of its causes is equivalent to some reference error. As in the Go standard library, an error is considered to match a reference error if it is equal to that target or if it implements a method Is(error) bool such that Is(reference) r
(err, reference error)
| 33 | // package location or a different type, ensure that |
| 34 | // RegisterTypeMigration() was called prior to Is(). |
| 35 | func Is(err, reference error) bool { return markers.Is(err, reference) } |
| 36 | |
| 37 | // HasType returns true iff err contains an error whose concrete type |
| 38 | // matches that of referenceType. |