MCPcopy
hub / github.com/gorilla/mux / HandlerFunc

Method HandlerFunc

route.go:136–138  ·  view source on GitHub ↗

HandlerFunc sets a handler function for the route.

(f func(http.ResponseWriter, *http.Request))

Source from the content-addressed store, hash-verified

134
135// HandlerFunc sets a handler function for the route.
136func (r *Route) HandlerFunc(f func(http.ResponseWriter, *http.Request)) *Route {
137 return r.Handler(http.HandlerFunc(f))
138}
139
140// GetHandler returns the handler for the route, if any.
141func (r *Route) GetHandler() http.Handler {

Callers 14

MiddlewareMethod · 0.80
TestMiddlewareExecutionFunction · 0.80
TestMiddlewareNotFoundFunction · 0.80
HandleFuncMethod · 0.80
methodNotAllowedHandlerFunction · 0.80
CORSMethodMiddlewareFunction · 0.80

Calls 1

HandlerMethod · 0.95

Tested by 11

MiddlewareMethod · 0.64
TestMiddlewareExecutionFunction · 0.64
TestMiddlewareNotFoundFunction · 0.64
TestContextMiddlewareFunction · 0.64
MiddlewareMethod · 0.64