mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-20 17:57:54 +00:00
remove : Prot default value removal
This commit is contained in:
@@ -19,7 +19,7 @@ func InitApplication(cfg *viper.Viper) *Application {
|
||||
ReadTimeout: cfg.GetInt("readTimeout"),
|
||||
WriterTimeout: cfg.GetInt("writerTimeout"),
|
||||
Host: cfg.GetString("host"),
|
||||
Port: portDefault(cfg),
|
||||
Port: cfg.GetString("port"),
|
||||
Name: cfg.GetString("name"),
|
||||
JwtSecret: cfg.GetString("jwtSecret"),
|
||||
Mode: cfg.GetString("mode"),
|
||||
@@ -28,13 +28,4 @@ func InitApplication(cfg *viper.Viper) *Application {
|
||||
}
|
||||
}
|
||||
|
||||
var ApplicationConfig = new(Application)
|
||||
|
||||
func portDefault(cfg *viper.Viper) string {
|
||||
if cfg.GetString("port") == "" {
|
||||
return "8000"
|
||||
} else {
|
||||
return cfg.GetString("port")
|
||||
}
|
||||
}
|
||||
|
||||
var ApplicationConfig = new(Application)
|
||||
Reference in New Issue
Block a user