Is reports whether any error in e matches target.
(target error)
| 88 | |
| 89 | // Is reports whether any error in e matches target. |
| 90 | func (e Error) Is(target error) bool { |
| 91 | for _, err := range e.errs { |
| 92 | if errors.Is(err, target) { |
| 93 | return true |
| 94 | } |
| 95 | } |
| 96 | return false |
| 97 | } |
| 98 | |
| 99 | // As finds the first error in e that matches target, and if any is found, |
| 100 | // sets target to that error value and returns true. Otherwise, it returns false. |
no outgoing calls