MCPcopy
hub / github.com/netbirdio/netbird / Is

Method Is

shared/management/status/error.go:75–81  ·  view source on GitHub ↗

Is reports whether target is an *Error with the same type and message, enabling matching with errors.Is against sentinel errors.

(target error)

Source from the content-addressed store, hash-verified

73// Is reports whether target is an *Error with the same type and message,
74// enabling matching with errors.Is against sentinel errors.
75func (e *Error) Is(target error) bool {
76 var t *Error
77 if !errors.As(target, &t) {
78 return false
79 }
80 return e.ErrorType == t.ErrorType && e.Message == t.Message
81}
82
83// Errorf returns Error(ErrorType, fmt.Sprintf(format, a...)).
84func Errorf(errorType Type, format string, a ...interface{}) error {

Callers 15

newTestServerFunction · 0.45
TestReceiveFunction · 0.45
TestSendFunction · 0.45
CloseMethod · 0.45
isContextDoneFunction · 0.45
ensureStaticPasswordsFunction · 0.45
ensureStaticClientsFunction · 0.45
ensureLocalConnectorFunction · 0.45
DisableLocalAuthMethod · 0.45
run.goFile · 0.45

Calls

no outgoing calls

Tested by 15

newTestServerFunction · 0.36
TestReceiveFunction · 0.36
TestSendFunction · 0.36
TestOpenAIParseRequestFunction · 0.36
collectEventsFunction · 0.36
TestVerifyFunction · 0.36