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

Function Walk

tree.go:834–836  ·  view source on GitHub ↗

Walk walks any router tree that implements Routes interface.

(r Routes, walkFn WalkFunc)

Source from the content-addressed store, hash-verified

832
833// Walk walks any router tree that implements Routes interface.
834func Walk(r Routes, walkFn WalkFunc) error {
835 return walk(r, walkFn, "")
836}
837
838func walk(r Routes, walkFn WalkFunc, parentRoute string, parentMw ...func(http.Handler) http.Handler) error {
839 for _, route := range r.Routes() {

Callers 3

TestCustomHTTPMethodFunction · 0.85
TestWalkerFunction · 0.85

Calls 1

walkFunction · 0.85

Tested by 3

TestCustomHTTPMethodFunction · 0.68
TestWalkerFunction · 0.68