How to get Current route name using the middleware


i read the docs there is naming on route

g = e.Group("/merchant")
g.GET("/transaction", handlers.MerchantGetTransaction, middlewares.RateLimit).Name = "merchant_transaction"

How can i get the prefix_name for current route using the middlewares.RateLimit ?
i want something to get “merchant_transaction” string


I haven’t really tried to do it in any of my projects, but I think one could get the name of the route from inside the middleware like so:

for _, v := range c.Echo().Routes() {
    if v.Path == c.Path() {