mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
config path
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
@@ -537,10 +536,8 @@ func initConfig(config interface{}, configName, configPath string) {
|
||||
unmarshalConfig(config, configPath)
|
||||
}
|
||||
|
||||
func InitConfig() {
|
||||
configPath := flag.String("config_path", "../config/", "config folder")
|
||||
flag.Parse()
|
||||
initConfig(&Config, "config.yaml", *configPath)
|
||||
initConfig(&NotificationConfig, "notification.yaml", *configPath)
|
||||
func InitConfig(configPath string) {
|
||||
initConfig(&Config, "config.yaml", configPath)
|
||||
initConfig(&NotificationConfig, "notification.yaml", configPath)
|
||||
Config.Notification = NotificationConfig.Notification
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user