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{})
| 378 | // ErrorIsf asserts that at least one of the errors in err's chain matches target. |
| 379 | // This is a wrapper for errors.Is. |
| 380 | func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) { |
| 381 | if h, ok := t.(tHelper); ok { |
| 382 | h.Helper() |
| 383 | } |
| 384 | if assert.ErrorIsf(t, err, target, msg, args...) { |
| 385 | return |
| 386 | } |
| 387 | t.FailNow() |
| 388 | } |
| 389 | |
| 390 | // Errorf asserts that a function returned an error (i.e. not `nil`). |
| 391 | // |