MCPcopy
hub / github.com/go-chi/chi / nextRoutePath

Method nextRoutePath

mux.go:487–494  ·  view source on GitHub ↗
(rctx *Context)

Source from the content-addressed store, hash-verified

485}
486
487func (mx *Mux) nextRoutePath(rctx *Context) string {
488 routePath := "/"
489 nx := len(rctx.routeParams.Keys) - 1 // index of last param in list
490 if nx >= 0 && rctx.routeParams.Keys[nx] == "*" && len(rctx.routeParams.Values) > nx {
491 routePath = "/" + rctx.routeParams.Values[nx]
492 }
493 return routePath
494}
495
496// Recursively update data on child routers.
497func (mx *Mux) updateSubRoutes(fn func(subMux *Mux)) {

Callers 2

MountMethod · 0.95
FindMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected