diff --git a/viper.go b/viper.go index 7b12b36..9a84bc3 100644 --- a/viper.go +++ b/viper.go @@ -1196,8 +1196,8 @@ func (v *Viper) AutomaticEnv() { // SetEnvKeyReplacer sets the strings.Replacer on the viper object // Useful for mapping an environmental variable to a key that does // not match it. -func SetEnvKeyReplacer(r *strings.Replacer) { v.SetEnvKeyReplacer(r) } -func (v *Viper) SetEnvKeyReplacer(r *strings.Replacer) { +func SetEnvKeyReplacer(r StringReplacer) { v.SetEnvKeyReplacer(r) } +func (v *Viper) SetEnvKeyReplacer(r StringReplacer) { v.envKeyReplacer = r }