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

Method updateRouteHandler

mux.go:511–513  ·  view source on GitHub ↗

updateRouteHandler builds the single mux handler that is a chain of the middleware stack, as defined by calls to Use(), and the tree router (Mux) itself. After this point, no other middlewares can be registered on this Mux's stack. But you can still compose additional middlewares via Group()'s or us

()

Source from the content-addressed store, hash-verified

509// point, no other middlewares can be registered on this Mux's stack. But you can still
510// compose additional middlewares via Group()'s or using a chained middleware handler.
511func (mx *Mux) updateRouteHandler() {
512 mx.handler = chain(mx.middlewares, http.HandlerFunc(mx.routeHTTP))
513}
514
515// methodNotAllowedHandler is a helper function to respond with a 405,
516// method not allowed. It sets the Allow header with the list of allowed

Callers 2

WithMethod · 0.95
handleMethod · 0.95

Calls 2

chainFunction · 0.85
HandlerFuncMethod · 0.80

Tested by

no test coverage detected