v0.0.462
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m32s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m32s
This commit is contained in:
@@ -72,20 +72,22 @@ func NewEngine(opt Options) *GinWrapper {
|
||||
engine.Use(CorsMiddleware())
|
||||
}
|
||||
|
||||
// do not debug-print routes
|
||||
gin.DebugPrintRouteFunc = func(_, _, _ string, _ int) {}
|
||||
if wrapper.ginDebug {
|
||||
gin.SetMode(gin.DebugMode)
|
||||
|
||||
if !wrapper.ginDebug {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
// do not debug-print routes
|
||||
gin.DebugPrintRouteFunc = func(_, _, _ string, _ int) {}
|
||||
|
||||
if !wrapper.suppressGinLogs {
|
||||
ginlogger := gin.Logger()
|
||||
engine.Use(func(context *gin.Context) {
|
||||
ginlogger(context)
|
||||
})
|
||||
engine.Use(func(context *gin.Context) { ginlogger(context) })
|
||||
}
|
||||
|
||||
} else {
|
||||
gin.SetMode(gin.DebugMode)
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
|
||||
// do not debug-print routes
|
||||
gin.DebugPrintRouteFunc = func(_, _, _ string, _ int) {}
|
||||
}
|
||||
|
||||
return wrapper
|
||||
|
Reference in New Issue
Block a user