MCPcopy Index your code
hub / github.com/expr-lang/expr / ErrorAs

Method ErrorAs

internal/testify/require/require_forward.go:242–247  ·  view source on GitHub ↗

ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. This is a wrapper for errors.As.

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

Source from the content-addressed store, hash-verified

240// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.
241// This is a wrapper for errors.As.
242func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) {
243 if h, ok := a.t.(tHelper); ok {
244 h.Helper()
245 }
246 ErrorAs(a.t, err, target, msgAndArgs...)
247}
248
249// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value.
250// This is a wrapper for errors.As.

Callers

nothing calls this directly

Calls 2

ErrorAsFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected