How to make a middleware so that it only works for some handlers (not for all)? For example,
func (srv *server) Router(repository storage.Repository, cfg config.Flags) *gin.Engine {
h := handlers.NewHandlerProvider()
m := middlewares.NewMiddlewareProvider()
srv.httpServer.Use(gin.Recovery())
srv.httpServer.Use(m.LogHTTPHandler())
srv.httpServer.POST("/", FirstHandler)
srv.httpServer.GET("/qwe", SecondHandler)
return srv.httpServer
}
I just want m.LogHTTPHandler() to work only with FirstHandler, not both