MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / Is

Method Is

pkg/errors/std.go:37–49  ·  view source on GitHub ↗

Is makes the Error implement error comparison.

(target error)

Source from the content-addressed store, hash-verified

35
36// Is makes the Error implement error comparison.
37func (e *Error) Is(target error) bool {
38 if e == nil {
39 return target == nil
40 }
41 if namedErr := (interface {
42 Namespace() string
43 Name() string
44 })(nil); errors.As(target, &namedErr) {
45 return namedErr.Namespace() == e.Namespace() &&
46 namedErr.Name() == e.Name()
47 }
48 return false
49}
50
51// Unwrap makes the Definition implement error unwrapping.
52func (*Definition) Unwrap() error {

Callers 15

SQLRestoreMethod · 0.45
walkDirFunction · 0.45
NewFunction · 0.45
GetUserMethod · 0.45
GetOrganizationMethod · 0.45
setMethod · 0.45
DefaultStartTaskFunction · 0.45
pingMethod · 0.45
handleConnectionMethod · 0.45
readGatewayMessagesFunction · 0.45
handleUpMethod · 0.45

Calls 3

NamespaceMethod · 0.65
NameMethod · 0.65
AsMethod · 0.45

Tested by 6

TestClientTokenAuthFunction · 0.36
TestDiscoverFunction · 0.36
TestDefaultTopicsFunction · 0.36
TestV2TopicsFunction · 0.36