MCPcopy Create free account
hub / github.com/juju/errors / Is

Function Is

functions.go:350–352  ·  view source on GitHub ↗

Is is a proxy for the Is function in Go's standard `errors` library (pkg.go.dev/errors).

(err, target error)

Source from the content-addressed store, hash-verified

348// Is is a proxy for the Is function in Go's standard `errors` library
349// (pkg.go.dev/errors).
350func Is(err, target error) bool {
351 return stderrors.Is(err, target)
352}
353
354// HasType is a function wrapper around AsType dropping the where return value
355// from AsType() making a function that can be used like this:

Callers 15

TestTraceMethod · 0.92
TestIsMethod · 0.92
mustSatisfyFunction · 0.92
mustNotSatisfyFunction · 0.92
TestWithTypeMethod · 0.92
IsTimeoutFunction · 0.85
IsNotFoundFunction · 0.85
IsUserNotFoundFunction · 0.85
IsUnauthorizedFunction · 0.85
IsNotImplementedFunction · 0.85
IsAlreadyExistsFunction · 0.85

Calls 1

IsMethod · 0.45

Tested by 6

TestTraceMethod · 0.74
TestIsMethod · 0.74
mustSatisfyFunction · 0.74
mustNotSatisfyFunction · 0.74
TestWithTypeMethod · 0.74