some extensions / enhancements to the gin router
| go.mod | ||
| go.sum | ||
| readme.md | ||
| router.go | ||
gin-ext
some extensions / enhancements to the gin router
Usage
With gin_ext.Router following syntax is now possible:
e := gin.New()
r := NewRouter(e)
r.Group("/api", func(r *Router) {
r.Group("/auth", func(r *Router) {
r.POST("/login", func(ctx *gin.Context) {
// ...
})
})
r.Group("/protected", func(r *Router) {
// ...
}, someAuthMiddleware)
})