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)
| 360 | // in the tree. The routes are walked in the order they were added. Sub-routers |
| 361 | // are explored depth-first. |
| 362 | func (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. |