From d652670db26bae964af238e08db33112afad7c46 Mon Sep 17 00:00:00 2001 From: Sheridan C Rawlins <41922797+scr-oath@users.noreply.github.com> Date: Mon, 10 May 2021 20:32:50 -0700 Subject: [PATCH] Make SetEnvKeyReplacer similar to EnvKeyReplacer in signature so you can actually write a different implementation --- viper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/viper.go b/viper.go index 50b4780..b216038 100644 --- a/viper.go +++ b/viper.go @@ -1305,9 +1305,9 @@ 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 SetEnvKeyReplacer(r StringReplacer) { v.SetEnvKeyReplacer(r) } -func (v *Viper) SetEnvKeyReplacer(r *strings.Replacer) { +func (v *Viper) SetEnvKeyReplacer(r StringReplacer) { v.envKeyReplacer = r }