ErrorIsf asserts that at least one of the errors in err's chain matches target. This is a wrapper for errors.Is.
(t TestingT, err error, target error, msg string, args ...interface{})
| 362 | // ErrorIsf asserts that at least one of the errors in err's chain matches target. |
| 363 | // This is a wrapper for errors.Is. |
| 364 | func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) { |
| 365 | if h, ok := t.(tHelper); ok { |
| 366 | h.Helper() |
| 367 | } |
| 368 | if assert.ErrorIsf(t, err, target, msg, args...) { |
| 369 | return |
| 370 | } |
| 371 | t.FailNow() |
| 372 | } |
| 373 | |
| 374 | // Errorf asserts that a function returned an error (i.e. not `nil`). |
| 375 | // |