MCPcopy Index your code
hub / github.com/cockroachdb/errors / Is

Function Is

markers_api.go:35–35  ·  view source on GitHub ↗

Is determines whether one of the causes of the given error or any of its causes is equivalent to some reference error. As in the Go standard library, an error is considered to match a reference error if it is equal to that target or if it implements a method Is(error) bool such that Is(reference) r

(err, reference error)

Source from the content-addressed store, hash-verified

33// package location or a different type, ensure that
34// RegisterTypeMigration() was called prior to Is().
35func Is(err, reference error) bool { return markers.Is(err, reference) }
36
37// HasType returns true iff err contains an error whose concrete type
38// matches that of referenceType.

Callers 6

BenchmarkErrorsIsFunction · 0.92
TestGrpcFunction · 0.92
IsPermissionFunction · 0.92
IsExistFunction · 0.92
IsNotExistFunction · 0.92
TestAsFunction · 0.92

Calls 1

IsFunction · 0.92

Tested by 3

BenchmarkErrorsIsFunction · 0.74
TestGrpcFunction · 0.74
TestAsFunction · 0.74