Routes interface adds two methods for router traversal, which is also used by the `docgen` subpackage to generation documentation for Routers.
| 116 | // Routes interface adds two methods for router traversal, which is also |
| 117 | // used by the `docgen` subpackage to generation documentation for Routers. |
| 118 | type 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. |
no outgoing calls
no test coverage detected