Mai Lapyst ee33d4dd24 | ||
---|---|---|
go.mod | ||
go.sum | ||
readme.md | ||
router.go |
readme.md
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)
})