feat: allow SetEnvKeyReplacer to take viper.StringReplacer

Signed-off-by: dan-j <5727701+dan-j@users.noreply.github.com>
This commit is contained in:
dan-j 2020-03-16 17:08:31 +00:00
parent 97ee7adfef
commit 7180a27422

View file

@ -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
}