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

Method ErrorIs

require/require_forward.go:299–304  ·  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

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