test cobra

This commit is contained in:
wangchuxiao
2023-03-06 18:26:23 +08:00
parent 94b0d55516
commit 6ca1d403b2
8 changed files with 55 additions and 17 deletions
+2 -4
View File
@@ -499,11 +499,9 @@ func (c *config) unmarshalConfig(config interface{}, configPath string) error {
func (c *config) initConfig(config interface{}, configName, configPath string) error {
if configPath == "" {
if configPath == "" {
configPath = DefaultPath
}
configPath = DefaultPath
}
_, err := os.Stat(configPath)
_, err := os.Stat(filepath.Join(configPath, configName))
if os.IsNotExist(err) {
configPath = filepath.Join(Root, "config", configName)
}
+2
View File
@@ -325,3 +325,5 @@ const BigVersion = "v2"
const LogFileName = "OpenIM.log"
const CurrentVersion = "v2.3.4-rc0"
const LocalHost = "0.0.0.0"