Update config.go

This commit is contained in:
Patrick Connolly
2018-11-03 21:32:05 +08:00
committed by GitHub
parent cd2b686a7e
commit 643a557c0c

View File

@@ -185,7 +185,7 @@ func NewConfig(cfgfile string) *Config {
viper.SetConfigFile(cfgfile) viper.SetConfigFile(cfgfile)
viper.SetEnvPrefix("matterbridge") viper.SetEnvPrefix("matterbridge")
viper.AddConfigPath(".") viper.AddConfigPath(".")
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "")) viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_"))
viper.AutomaticEnv() viper.AutomaticEnv()
f, err := os.Open(cfgfile) f, err := os.Open(cfgfile)
if err != nil { if err != nil {