FullPath returns a matched route full path. For not found routes returns an empty string. router.GET("/user/:id", func(c *gin.Context) { c.FullPath() == "/user/:id" // true })
()
| 175 | // c.FullPath() == "/user/:id" // true |
| 176 | // }) |
| 177 | func (c *Context) FullPath() string { |
| 178 | return c.fullPath |
| 179 | } |
| 180 | |
| 181 | /************************************/ |
| 182 | /*********** FLOW CONTROL ***********/ |
no outgoing calls