使用viper读取配置
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"ems.agt/lib/core/conf"
|
||||
"ems.agt/lib/global"
|
||||
"ems.agt/lib/log"
|
||||
|
||||
@@ -327,6 +328,9 @@ func init() {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
// 使用viper读取配置
|
||||
conf.InitConfig(*cfile)
|
||||
|
||||
ReadConfig(*cfile)
|
||||
if GetYamlConfig().OMC.UriPrefix != "" {
|
||||
UriPrefix = GetYamlConfig().OMC.UriPrefix
|
||||
|
||||
Reference in New Issue
Block a user