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

Function Handler

versioning/version.go:245–254  ·  view source on GitHub ↗

Handler returns a handler which is only fired when the "version" is matched with the requested one. It is not meant to be used by end-developers (exported for version controller feature). Use `NewGroup` instead.

(version string)

Source from the content-addressed store, hash-verified

243// (exported for version controller feature).
244// Use `NewGroup` instead.
245func Handler(version string) context.Handler {
246 validate, err := semver.ParseRange(version)
247 if err != nil {
248 return func(ctx *context.Context) {
249 ctx.StopWithError(500, err)
250 }
251 }
252
253 return makeHandler(validate)
254}
255
256// GetVersionAlias returns the version alias of the given "gotVersion"
257// or empty. It Reports whether the alias was found.

Callers 1

VersionFunction · 0.92

Calls 2

StopWithErrorMethod · 0.80
makeHandlerFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…