ErrorIs 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, msgAndArgs ...interface{})
| 351 | // ErrorIs asserts that at least one of the errors in err's chain matches target. |
| 352 | // This is a wrapper for errors.Is. |
| 353 | func ErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) { |
| 354 | if h, ok := t.(tHelper); ok { |
| 355 | h.Helper() |
| 356 | } |
| 357 | if assert.ErrorIs(t, err, target, msgAndArgs...) { |
| 358 | return |
| 359 | } |
| 360 | t.FailNow() |
| 361 | } |
| 362 | |
| 363 | // ErrorIsf asserts that at least one of the errors in err's chain matches target. |
| 364 | // This is a wrapper for errors.Is. |