UseOnce either inserts a middleware, or on the basis of the middleware already existing, replace that existing middleware instead. To register a middleware for error handlers, look `UseError` method instead.
(handlers ...context.Handler)
| 1314 | // replace that existing middleware instead. |
| 1315 | // To register a middleware for error handlers, look `UseError` method instead. |
| 1316 | func (api *APIBuilder) UseOnce(handlers ...context.Handler) { |
| 1317 | api.middleware = context.UpsertHandlers(api.middleware, handlers) |
| 1318 | } |
| 1319 | |
| 1320 | // UseGlobal registers handlers that should run at the very beginning. |
| 1321 | // It prepends those handler(s) to all routes, |
nothing calls this directly
no test coverage detected