MCPcopy Create free account
hub / github.com/mpolden/echoip / Handler

Method Handler

http/router.go:40–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40func (r *router) Handler() http.Handler {
41 return appHandler(func(w http.ResponseWriter, req *http.Request) *appError {
42 for _, route := range r.routes {
43 if route.match(req) {
44 return route.handler(w, req)
45 }
46 }
47 return NotFoundHandler(w, req)
48 })
49}
50
51func (r *route) Header(header, value string) {
52 r.MatcherFunc(func(req *http.Request) bool {

Callers

nothing calls this directly

Calls 3

appHandlerFuncType · 0.85
NotFoundHandlerFunction · 0.85
matchMethod · 0.80

Tested by

no test coverage detected