These are chat archives for gin-gonic/gin
Gin is a web framework written in Golang. It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
Evening all, I'm trying to reason out why the router isn't following good sense in an application I'm developing. I have the following snippet:
hubs := v1.Group("hubs/") hubs.GET("/", s.getHubs) hubs.POST("/", s.newHub) hubs.GET("/:id", s.getHub) hubs.PUT("/update/:id", s.modHub) hubs.PUT("/deactivate/:id", s.deactivateHub) hubs.PUT("/activate/:id", s.activateHub) hubDirector := hubs.Group("director/") hubDirector.GET("/:id", s.getHubDirector) hubDirector.POST("/:id", s.setHubDirector)
I get the following error instead of it working:
panic: path segment 'director/:id' conflicts with existing wildcard ':id' in path '/v1/hubs/director/:id'