style: 代码顺序
This commit is contained in:
@@ -27,10 +27,6 @@ import (
|
||||
// 初始应用引擎
|
||||
func AppEngine() *gin.Engine {
|
||||
var app *gin.Engine
|
||||
|
||||
// 禁止控制台日志输出的颜色
|
||||
gin.DisableConsoleColor()
|
||||
|
||||
// 根据运行环境注册引擎
|
||||
if config.Env() == "prod" {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
@@ -39,6 +35,8 @@ func AppEngine() *gin.Engine {
|
||||
} else {
|
||||
app = gin.Default()
|
||||
}
|
||||
// 禁止控制台日志输出的颜色
|
||||
gin.DisableConsoleColor()
|
||||
app.ForwardedByClientIP = true
|
||||
return app
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user