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

Method Walk

mux.go:362–364  ·  view source on GitHub ↗

Walk walks the router and all its sub-routers, calling walkFn for each route in the tree. The routes are walked in the order they were added. Sub-routers are explored depth-first.

(walkFn WalkFunc)

Source from the content-addressed store, hash-verified

360// in the tree. The routes are walked in the order they were added. Sub-routers
361// are explored depth-first.
362func (r *Router) Walk(walkFn WalkFunc) error {
363 return r.walk(walkFn, []*Route{})
364}
365
366// SkipRouter is used as a return value from WalkFuncs to indicate that the
367// router that walk is about to descend down to should be skipped.

Callers 6

TestWalkSingleDepthFunction · 0.95
TestWalkNestedFunction · 0.95
TestWalkSubroutersFunction · 0.95
TestWalkErrorRouteFunction · 0.95
TestWalkErrorMatcherFunction · 0.95
TestWalkErrorHandlerFunction · 0.95

Calls 1

walkMethod · 0.95

Tested by 6

TestWalkSingleDepthFunction · 0.76
TestWalkNestedFunction · 0.76
TestWalkSubroutersFunction · 0.76
TestWalkErrorRouteFunction · 0.76
TestWalkErrorMatcherFunction · 0.76
TestWalkErrorHandlerFunction · 0.76