As finds the first error in err's tree that matches target, and if one is found, sets target to that error value and returns true. Otherwise, it returns false. For more information see stdlib errors.As.
(err error, target interface{})
| 12 | // |
| 13 | // For more information see stdlib errors.As. |
| 14 | func As(err error, target interface{}) bool { |
| 15 | return baseErrors.As(err, target) |
| 16 | } |
| 17 | |
| 18 | // Is detects whether the error is equal to a given error. Errors |
| 19 | // are considered equal by this function if they are matched by errors.Is |