MCPcopy Create free account
hub / github.com/donutloop/mux / ServeHTTP

Method ServeHTTP

router.go:78–116  ·  view source on GitHub ↗

ServeHTTP dispatches the handler registered in the matched route. When there is a match, the route variables can be retrieved calling mux.GetVars(req).Get(":number") or mux.GetVars(req).GetAll() and the route queires can be retrieved calling mux.GetQueries(req).Get(":number") or mux.GetQueries(req

(w http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

testRouteFunction · 0.80
TestRouteNotfoundFunction · 0.80
TestRouteWithoutHandlerFunction · 0.80

Calls 11

triggerMatchingMethod · 0.95
notFoundHandlerMethod · 0.95
cleanPathFunction · 0.85
AddCurrentRouteFunction · 0.85
AddQueriesFunction · 0.85
AddVarsFunction · 0.85
HasVarsMethod · 0.65
ExtractVarsMethod · 0.65
HasHandlerMethod · 0.65
HandlerMethod · 0.65
GetHandlerMethod · 0.65

Tested by 3

testRouteFunction · 0.64
TestRouteNotfoundFunction · 0.64
TestRouteWithoutHandlerFunction · 0.64