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

Function CurrentRoute

context.go:30–35  ·  view source on GitHub ↗

CurrentRoute returns the matched route for the current request. This only works when called inside the handler of the matched route because the matched route is stored in the request context which is cleared after the handler returns

(r *http.Request)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

TestCurrentRouteFailFunction · 0.85
testRouteFunction · 0.85

Calls 1

contextGetFunction · 0.85

Tested by 2

TestCurrentRouteFailFunction · 0.68
testRouteFunction · 0.68