Merge branch 'v2.3.0release' of github.com:OpenIMSDK/Open-IM-Server into v2.3.0release

pull/261/head
wangchuxiao 3 years ago
commit e2e5ab656f

@ -512,13 +512,12 @@ type PDefaultTips struct {
func init() { func init() {
cfgName := os.Getenv("CONFIG_NAME") cfgName := os.Getenv("CONFIG_NAME")
fmt.Println(Root, cfgName) fmt.Println("GET IM DEFAULT CONFIG PATH :", Root, "ENV PATH:", cfgName, b, filepath.Dir(b))
if len(cfgName) != 0 {
if len(cfgName) == 0 { Root = cfgName
cfgName = Root + "/config/config.yaml"
} }
bytes, err := ioutil.ReadFile(cfgName) bytes, err := ioutil.ReadFile(filepath.Join(Root, "config", "config.yaml"))
if err != nil { if err != nil {
panic(err.Error()) panic(err.Error())
} }

Loading…
Cancel
Save