NoRoute adds handlers for NoRoute. It returns a 404 code by default.
(handlers ...HandlerFunc)
| 324 | |
| 325 | // NoRoute adds handlers for NoRoute. It returns a 404 code by default. |
| 326 | func (engine *Engine) NoRoute(handlers ...HandlerFunc) { |
| 327 | engine.noRoute = handlers |
| 328 | engine.rebuild404Handlers() |
| 329 | } |
| 330 | |
| 331 | // NoMethod sets the handlers called when Engine.HandleMethodNotAllowed = true. |
| 332 | func (engine *Engine) NoMethod(handlers ...HandlerFunc) { |