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

Method Use

core/router/api_builder.go:1308–1310  ·  view source on GitHub ↗

Use appends Handler(s) to the current Party's routes and child routes. If the current Party is the root, then it registers the middleware to all child Parties' routes too. The given "handlers" will be executed only on matched routes. Call order matters, it should be called right before the routes t

(handlers ...context.Handler)

Source from the content-addressed store, hash-verified

1306// that should be always run before all application's routes.
1307// To register a middleware for error handlers, look `UseError` method instead.
1308func (api *APIBuilder) Use(handlers ...context.Handler) {
1309 api.middleware = append(api.middleware, handlers...)
1310}
1311
1312// UseOnce either inserts a middleware,
1313// or on the basis of the middleware already existing,

Callers 3

RegisterViewMethod · 0.95
FallbackViewMethod · 0.95
LayoutMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected