ozzo-routing
ozzo-routing copied to clipboard
Is there a way to get the name of current route?
Im want to do some permission check in middleware.
I don't use this package, but by looking at the source code, I can say you can get the request path using this:
func yourController(c *routing.Context) {
path := c.Request.URL.Path
c.Write(fmt.Sprintf("you hit %s", path))
}