ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. This is a wrapper for errors.As.
(err error, target interface{}, msgAndArgs ...interface{})
| 254 | // ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. |
| 255 | // This is a wrapper for errors.As. |
| 256 | func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool { |
| 257 | if h, ok := a.t.(tHelper); ok { |
| 258 | h.Helper() |
| 259 | } |
| 260 | return ErrorAs(a.t, err, target, msgAndArgs...) |
| 261 | } |
| 262 | |
| 263 | // ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. |
| 264 | // This is a wrapper for errors.As. |