Browse Source

Fix data race about config

pull/1273/head
wuyuxiang 5 years ago
parent
commit
b556d3d035
  1. 3
      weed/util/config.go

3
weed/util/config.go

@ -42,7 +42,8 @@ func LoadConfiguration(configFileName string, required bool) (loaded bool) {
}
func GetViper() *viper.Viper {
v := viper.GetViper()
v := &viper.Viper{}
*v = *viper.GetViper()
v.AutomaticEnv()
v.SetEnvPrefix("weed")
v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))

Loading…
Cancel
Save