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{})
| 238 | // ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. |
| 239 | // This is a wrapper for errors.As. |
| 240 | func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool { |
| 241 | if h, ok := a.t.(tHelper); ok { |
| 242 | h.Helper() |
| 243 | } |
| 244 | return ErrorAs(a.t, err, target, msgAndArgs...) |
| 245 | } |
| 246 | |
| 247 | // ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. |
| 248 | // This is a wrapper for errors.As. |