clear:formatting code
This commit is contained in:
1 parent
426cec1b62
commit
8c554d7ee7
52 files changed
+486
-502
No files matched your search
@@ -16,7 +16,6 @@ var cfgLog *viper.Viper
|
||||
var cfgSsl *viper.Viper
|
||||
var cfgGen *viper.Viper
|
||||
|
||||
|
||||
//载入配置文件
|
||||
func ConfigSetup(path string) {
|
||||
viper.SetConfigFile(path)
|
||||
@@ -25,7 +24,6 @@ func ConfigSetup(path string) {
|
||||
log.Fatal(fmt.Sprintf("Read config file fail: %s", err.Error()))
|
||||
}
|
||||
|
||||
|
||||
//Replace environment variables
|
||||
err = viper.ReadConfig(strings.NewReader(os.ExpandEnv(string(content))))
|
||||
if err != nil {
|
||||
@@ -69,7 +67,6 @@ func ConfigSetup(path string) {
|
||||
GenConfig = InitGen(cfgGen)
|
||||
}
|
||||
|
||||
|
||||
func SetConfig(configPath string, key string, value interface{}) {
|
||||
viper.AddConfigPath(configPath)
|
||||
viper.Set(key, value)
|
||||
|
||||
Reference in new issue
Block a user