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

Method updateSubRoutes

mux.go:497–505  ·  view source on GitHub ↗

Recursively update data on child routers.

(fn func(subMux *Mux))

Source from the content-addressed store, hash-verified

495
496// Recursively update data on child routers.
497func (mx *Mux) updateSubRoutes(fn func(subMux *Mux)) {
498 for _, r := range mx.tree.routes() {
499 subMux, ok := r.SubRoutes.(*Mux)
500 if !ok {
501 continue
502 }
503 fn(subMux)
504 }
505}
506
507// updateRouteHandler builds the single mux handler that is a chain of the middleware
508// stack, as defined by calls to Use(), and the tree router (Mux) itself. After this

Callers 2

NotFoundMethod · 0.80
MethodNotAllowedMethod · 0.80

Calls 1

routesMethod · 0.80

Tested by

no test coverage detected