These are chat archives for gin-gonic/gin

28th
May 2017
Yang Luo
@hsluoyz
May 28 2017 03:38
Hi, how to specify a router pattern that matches all URL paths?
I tried or / but it doesn't work
Thomas Boerger
@tboerger
May 28 2017 09:39
/*yout_variable_name
Yang Luo
@hsluoyz
May 28 2017 14:21
What do you mean by "yout_variable_name"?
router.Any("/*", func(c *gin.Context) {
    c.Status(200)
})
I just want all requests (all methods and all paths) to be reponded with HTTP 200.
But the above code doesn't work
The compiler explains: panic: wildcards must be named with a non-empty name in path '/*'