MCPcopy Create free account
hub / github.com/kataras/iris / Is

Method Is

core/errgroup/errgroup.go:113–129  ·  view source on GitHub ↗

Is reports whether the "err" is an *Error.

(err error)

Source from the content-addressed store, hash-verified

111
112// Is reports whether the "err" is an *Error.
113func (e *Error) Is(err error) bool {
114 if err == nil {
115 return false
116 }
117
118 ok := errors.Is(e.Err, err)
119 if !ok {
120 te, ok := err.(*Error)
121 if !ok {
122 return false
123 }
124
125 return errors.Is(e.Err, te.Err)
126 }
127
128 return ok
129}
130
131// As reports whether the "target" can be used as &Error{target.Type: ?}.
132func (e *Error) As(target interface{}) bool {

Callers 6

BindFileMethod · 0.45
TestErrorIsFunction · 0.45
ServeMethod · 0.45
validateErrMethod · 0.45
overlapRouteFunction · 0.45
ReadPayloadFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestErrorIsFunction · 0.36