add routes function to http context (#649)

This commit is contained in:
Jorrit Klein Bramel 2018-07-22 15:58:21 +02:00
parent 220e8d3453
commit 25dd285539

View File

@ -95,6 +95,12 @@ func (c *Context) Handler() HandlerFunc {
return c.handlers.Last()
}
// Routes returns a slice of registered routes, including some useful information, such as:
// the http method, path and the handler name.
func (c *Context) Routes() RoutesInfo {
return c.engine.Routes()
}
/************************************/
/*********** FLOW CONTROL ***********/
/************************************/