From 7180a274221bfd98a73180e73c036ddf72ba1826 Mon Sep 17 00:00:00 2001 From: dan-j <5727701+dan-j@users.noreply.github.com> Date: Mon, 16 Mar 2020 17:08:31 +0000 Subject: [PATCH] feat: allow SetEnvKeyReplacer to take viper.StringReplacer Signed-off-by: dan-j <5727701+dan-j@users.noreply.github.com> --- viper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }