Is reports whether any error in err's chain matches target. The chain consists of err itself followed by the sequence of errors obtained by repeatedly calling Unwrap. An error is considered to match a target if it is equal to that target or if it implements a method Is(error) bool such that Is(tar
(err, target error)
| 14 | // An error is considered to match a target if it is equal to that target or if |
| 15 | // it implements a method Is(error) bool such that Is(target) returns true. |
| 16 | func Is(err, target error) bool { return stderrors.Is(err, target) } |
| 17 | |
| 18 | // As finds the first error in err's chain that matches target, and if so, sets |
| 19 | // target to that error value and returns true. |