mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
config file update
This commit is contained in:
parent
7cc9d6707c
commit
bc0e9eb74e
@ -511,13 +511,13 @@ type PDefaultTips struct {
|
||||
|
||||
func init() {
|
||||
cfgName := os.Getenv("CONFIG_NAME")
|
||||
fmt.Println(Root, cfgName)
|
||||
fmt.Println("GET IM CONFIG PATH :", Root, cfgName)
|
||||
|
||||
if len(cfgName) == 0 {
|
||||
cfgName = Root + "/config/config.yaml"
|
||||
if len(cfgName) != 0 {
|
||||
Root = cfgName
|
||||
}
|
||||
|
||||
bytes, err := ioutil.ReadFile(cfgName)
|
||||
bytes, err := ioutil.ReadFile(filepath.Join(Root, "config", "config.yaml"))
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user