As finds the first error in err's chain that matches the type to which target points, and if so, sets the target to its value and returns true. An error matches a type if it is assignable to the target type, or if it has a method As(interface{}) bool such that As(target) returns true. As will panic
(err error, target interface{})
| 200 | // - it also supports recursing through causes with Cause(). |
| 201 | // - if it detects an API use error, its panic object is a valid error. |
| 202 | func As(err error, target interface{}) bool { return errutil.As(err, target) } |
| 203 | |
| 204 | // Join returns an error that wraps the given errors. |
| 205 | // Any nil error values are discarded. |