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

Function makeHandler

versioning/group.go:130–146  ·  view source on GitHub ↗
(validate semver.Range)

Source from the content-addressed store, hash-verified

128}
129
130func makeHandler(validate semver.Range) context.Handler {
131 return func(ctx *context.Context) {
132 if !matchVersionRange(ctx, validate) {
133 // The overlapped handler has an exception
134 // of a type of context.NotFound (which versioning.ErrNotFound wraps)
135 // to clear the status code
136 // and the error to ignore this
137 // when available match version exists (see `NewGroup`).
138 if h := NotFoundHandler; h != nil {
139 h(ctx)
140 return
141 }
142 }
143
144 ctx.Next()
145 }
146}

Callers 2

NewGroupFunction · 0.70
HandlerFunction · 0.70

Calls 3

matchVersionRangeFunction · 0.85
NextMethod · 0.80
hFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…