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

Method ErrorIsf

assert/assertion_forward.go:307–312  ·  view source on GitHub ↗

ErrorIsf 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, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

305// ErrorIsf asserts that at least one of the errors in err's chain matches target.
306// This is a wrapper for errors.Is.
307func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) bool {
308 if h, ok := a.t.(tHelper); ok {
309 h.Helper()
310 }
311 return ErrorIsf(a.t, err, target, msg, args...)
312}
313
314// Errorf asserts that a function returned an error (i.e. not `nil`).
315//

Callers

nothing calls this directly

Calls 2

ErrorIsfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected