RestartRouting instead of going to the next handler. This may be useful after changing the request path. Note that handlers might be executed again.
()
| 274 | // RestartRouting instead of going to the next handler. This may be useful after |
| 275 | // changing the request path. Note that handlers might be executed again. |
| 276 | func (c *DefaultCtx) RestartRouting() error { |
| 277 | c.indexRoute = -1 |
| 278 | if c.handlerCtx != nil { |
| 279 | _, err := c.app.nextCustom(c.handlerCtx) |
| 280 | return err |
| 281 | } |
| 282 | _, err := c.app.next(c) |
| 283 | return err |
| 284 | } |
| 285 | |
| 286 | func (c *DefaultCtx) setHandlerCtx(ctx CustomCtx) { |
| 287 | if ctx == nil { |
nothing calls this directly
no test coverage detected