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)
| 1306 | // that should be always run before all application's routes. |
| 1307 | // To register a middleware for error handlers, look `UseError` method instead. |
| 1308 | func (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, |
no outgoing calls
no test coverage detected