These are chat archives for gin-gonic/gin

7th
Sep 2016
Depado
@Depado
Sep 07 2016 12:48
Hey there, quick question, is there a way I can link a middleware ton only one route ?
Something like
myrouter.GET("endpoint", view).Use(customMiddleware)
David Marchbanks
@ptdave20
Sep 07 2016 12:50
Two ways I know. First using a router group. Other way is just calling it before your route handler
David Marchbanks
@ptdave20
Sep 07 2016 13:06
my router.GET("endpoint", middleware(), view)
Depado
@Depado
Sep 07 2016 13:12
Oh nice
Thanks a lot people that will help :)