some extensions / enhancements to the gin router
Go to file
Mai Lapyst ee33d4dd24 tidy go.mod 2022-09-06 18:21:24 +02:00
go.mod tidy go.mod 2022-09-06 18:21:24 +02:00
go.sum tidy go.mod 2022-09-06 18:21:24 +02:00
readme.md Initial commit; release v0.1.0 2022-09-06 18:20:29 +02:00
router.go Initial commit; release v0.1.0 2022-09-06 18:20:29 +02:00

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)
})