MCPcopy
hub / github.com/gofiber/fiber / RestartRouting

Method RestartRouting

ctx.go:276–284  ·  view source on GitHub ↗

RestartRouting instead of going to the next handler. This may be useful after changing the request path. Note that handlers might be executed again.

()

Source from the content-addressed store, hash-verified

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.
276func (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
286func (c *DefaultCtx) setHandlerCtx(ctx CustomCtx) {
287 if ctx == nil {

Callers

nothing calls this directly

Calls 2

nextCustomMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected