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

Method HandlerFunc

chain.go:18–20  ·  chain.go::Middlewares.HandlerFunc

HandlerFunc builds and returns a http.Handler from the chain of middlewares, with `h http.Handler` as the final handler.

(h http.HandlerFunc)

Source from the content-addressed store, hash-verified

16// HandlerFunc builds and returns a http.Handler from the chain of middlewares,
17// with `h http.Handler` as the final handler.
18func (mws Middlewares) HandlerFunc(h http.HandlerFunc) http.Handler {
19 return &ChainHandler{h, chain(mws, h), mws}
20}
21
22// ChainHandler is a http.Handler with support for handler composition and
23// execution.

Callers 15

NotFoundMethod · 0.80
MethodNotAllowedMethod · 0.80
MountMethod · 0.80
handleMethod · 0.80
updateRouteHandlerMethod · 0.80
TestMuxBasicFunction · 0.80
TestMuxNestedNotFoundFunction · 0.80
TestMuxWithFunction · 0.80
TestRouterFromMuxWithFunction · 0.80
TestMuxMiddlewareStackFunction · 0.80
TestMuxRouteGroupsFunction · 0.80

Calls 1

chainFunction · 0.85

Tested by 15

TestMuxBasicFunction · 0.64
TestMuxNestedNotFoundFunction · 0.64
TestMuxWithFunction · 0.64
TestRouterFromMuxWithFunction · 0.64
TestMuxMiddlewareStackFunction · 0.64
TestMuxRouteGroupsFunction · 0.64
bigMuxFunction · 0.64
TestMuxSubroutesBasicFunction · 0.64
TestMuxSubroutesFunction · 0.64
TestSingleHandlerFunction · 0.64
TestNestedGroupsFunction · 0.64