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

Interface Routes

chi.go:118–133  ·  chi.go::Routes

Routes interface adds two methods for router traversal, which is also used by the `docgen` subpackage to generation documentation for Routers.

Source from the content-addressed store, hash-verified

116// Routes interface adds two methods for router traversal, which is also
117// used by the `docgen` subpackage to generation documentation for Routers.
118type Routes interface {
119 // Routes returns the routing tree in an easily traversable structure.
120 Routes() []Route
121
122 // Middlewares returns the list of middlewares in use by the router.
123 Middlewares() Middlewares
124
125 // Match searches the routing tree for a handler that matches
126 // the method/path - similar to routing a http request, but without
127 // executing the handler thereafter.
128 Match(rctx *Context, method, path string) bool
129
130 // Find searches the routing tree for the pattern that matches
131 // the method/path.
132 Find(rctx *Context, method, path string) string
133}
134
135// Middlewares type is a slice of standard middleware handlers with methods
136// to compose middleware chains and http.Handler's.

Callers 11

walkFunction · 0.65
mainFunction · 0.65
walkFunction · 0.65
TestMuxMatchFunction · 0.65
TestMuxMatch_HasBasePathFunction · 0.65
SupressNotFoundFunction · 0.65
GetHeadFunction · 0.65
IsMatchMethod · 0.65
FindMethod · 0.65
TestMuxFindFunction · 0.65

Implementers 1

Muxmux.go

Calls

no outgoing calls

Tested by

no test coverage detected