MCPcopy
hub / github.com/safing/portmaster / Is

Method Is

spn/terminal/errors.go:44–54  ·  view source on GitHub ↗

Is returns whether the given error is of the same type.

(target error)

Source from the content-addressed store, hash-verified

42
43// Is returns whether the given error is of the same type.
44func (e *Error) Is(target error) bool {
45 if e == nil || target == nil {
46 return false
47 }
48
49 t, ok := target.(*Error) //nolint:errorlint // Error implementation, not usage.
50 if !ok {
51 return false
52 }
53 return e.id == t.id
54}
55
56// Unwrap returns the wrapped error.
57func (e *Error) Unwrap() error {

Callers 15

GetWorkerInfoMethod · 0.45
selfcheckTaskFuncFunction · 0.45
handleRequestFunction · 0.45
NewFunction · 0.45
updateAndUpgradeMethod · 0.45
updateCheckWorkerMethod · 0.45
upgradeWorkerMethod · 0.45
decompressGzipFunction · 0.45
decompressZipFunction · 0.45
upgradeMoveFilesMethod · 0.45

Calls

no outgoing calls

Tested by 2

TestDbusFunction · 0.36
TestRustInfoFileFunction · 0.36