MCPcopy
hub / github.com/stretchr/testify / ErrorIs

Method ErrorIs

assert/assertion_forward.go:298–303  ·  view source on GitHub ↗

ErrorIs asserts that at least one of the errors in err's chain matches target. This is a wrapper for errors.Is.

(err error, target error, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

296// ErrorIs asserts that at least one of the errors in err's chain matches target.
297// This is a wrapper for errors.Is.
298func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) bool {
299 if h, ok := a.t.(tHelper); ok {
300 h.Helper()
301 }
302 return ErrorIs(a.t, err, target, msgAndArgs...)
303}
304
305// ErrorIsf asserts that at least one of the errors in err's chain matches target.
306// This is a wrapper for errors.Is.

Callers

nothing calls this directly

Calls 2

ErrorIsFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected