I have a route configuration as below with a base route and 5 subroutes under that
baseRoute := app.Group("/base")
baseRoute.Post("/sub_route1", handler1)
baseRoute.Post("/sub_route2", handler2)
baseRoute.Post("/sub_route3", handler3)
baseRoute.Post("/sub_route4", handler4)
baseRoute.Post("/sub_route5", handler5)
now i have two different middlewares. I need to use middleware_1 on subroutes 1, 2, 3 and middleware_2 on subroutes 4, 5. What is the best syntax to do this. The solution that i came accross was to use app.Use("/path", middleware) method and explicitly declare the middlewares in each route. Is that the only solution or we have a cleaner way of doing it.