mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-11 12:36:00 +08:00
test cobra
This commit is contained in:
@@ -502,6 +502,9 @@ func (c *config) initConfig(config interface{}, configName, configFolderPath str
|
||||
configFolderPath = DefaultFolderPath
|
||||
}
|
||||
configPath := filepath.Join(configFolderPath, configName)
|
||||
defer func() {
|
||||
fmt.Println("use config", configPath)
|
||||
}()
|
||||
_, err := os.Stat(configPath)
|
||||
if err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
@@ -527,9 +530,6 @@ func (c *config) GetConfFromRegistry(registry discoveryregistry.SvcDiscoveryRegi
|
||||
}
|
||||
|
||||
func InitConfig(configFolderPath string) error {
|
||||
defer func() {
|
||||
fmt.Println("use config folder", configFolderPath)
|
||||
}()
|
||||
err := Config.initConfig(&Config, FileName, configFolderPath)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user