更新 'internal/config/app_config.go'

This commit is contained in:
耿阳 2024-02-18 13:32:12 +08:00
parent 4124e0fd45
commit eda9be87a8

View File

@ -128,11 +128,11 @@ type AppConfig struct {
func GetConf() (iniConf string, err error) { func GetConf() (iniConf string, err error) {
if os.Getenv(model.MODE_ENV) != "" { if os.Getenv(model.MODE_ENV) != "" {
if err = os.Setenv(constant.ConfigFileEnvKey, fmt.Sprintf("./conf/%s", model.SERVER_DUBBOGO_CONFIG)); err != nil { if err = os.Setenv(constant.ConfigFileEnvKey, fmt.Sprintf("./conf/%s%s", os.Getenv(model.MODE_ENV), model.SERVER_DUBBOGO_CONFIG)); err != nil {
return return
} }
} }
iniConf = fmt.Sprintf("./conf/%s/%s", os.Getenv(model.MODE_ENV), model.SERVER_CONFIG) iniConf = fmt.Sprintf("./conf/%s", model.SERVER_CONFIG)
return return
} }