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