mirror of https://github.com/spf13/viper.git
feat: allow SetEnvKeyReplacer to take viper.StringReplacer
Signed-off-by: dan-j <5727701+dan-j@users.noreply.github.com>
This commit is contained in:
parent
97ee7adfef
commit
7180a27422
4
viper.go
4
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue