MCPcopy Create free account
hub / github.com/foxcpp/maddy / IsTemporary

Function IsTemporary

framework/exterrors/temporary.go:43–49  ·  view source on GitHub ↗

IsTemporary returns true whether the passed error object have a Temporary() method and it returns true.

(err error)

Source from the content-addressed store, hash-verified

41// IsTemporary returns true whether the passed error object
42// have a Temporary() method and it returns true.
43func IsTemporary(err error) bool {
44 var temp TemporaryErr
45 if errors.As(err, &temp) {
46 return temp.Temporary()
47 }
48 return false
49}
50
51type temporaryErr struct {
52 err error

Callers 6

authErrorMapMethod · 0.92
wrapErrMethod · 0.92
TestDkimVerify_FailOpenFunction · 0.92
SMTPCodeFunction · 0.85
SMTPEnchCodeFunction · 0.85

Calls 1

TemporaryMethod · 0.95

Tested by 2

TestDkimVerify_FailOpenFunction · 0.74