mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-23 18:22:23 +08:00
add routes function to http context (#649)
This commit is contained in:
parent
220e8d3453
commit
25dd285539
@ -95,6 +95,12 @@ func (c *Context) Handler() HandlerFunc {
|
|||||||
return c.handlers.Last()
|
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 ***********/
|
/*********** FLOW CONTROL ***********/
|
||||||
/************************************/
|
/************************************/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user