Skip to content

Commit b5729ee

Browse files
manucorporatjulienschmidt
authored andcommitted
Fixes Gin integration
1 parent f22173f commit b5729ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

routers.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ func ginHandleTest(c *gin.Context) {
398398
}
399399

400400
func initGin() {
401-
gin.SetMode("release")
401+
gin.SetMode(gin.ReleaseMode)
402402
}
403403

404404
func loadGin(routes []route) http.Handler {
@@ -409,14 +409,14 @@ func loadGin(routes []route) http.Handler {
409409

410410
router := gin.New()
411411
for _, route := range routes {
412-
router.Handle(route.method, route.path, []gin.HandlerFunc{h})
412+
router.Handle(route.method, route.path, h)
413413
}
414414
return router
415415
}
416416

417417
func loadGinSingle(method, path string, handle gin.HandlerFunc) http.Handler {
418418
router := gin.New()
419-
router.Handle(method, path, []gin.HandlerFunc{handle})
419+
router.Handle(method, path, handle)
420420
return router
421421
}
422422

0 commit comments

Comments
 (0)