mirror of
https://github.com/spf13/viper
synced 2024-12-23 12:07:02 +00:00
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
1 changed files with 2 additions and 2 deletions
4
viper.go
4
viper.go
|
@ -1196,8 +1196,8 @@ func (v *Viper) AutomaticEnv() {
|
||||||
// SetEnvKeyReplacer sets the strings.Replacer on the viper object
|
// SetEnvKeyReplacer sets the strings.Replacer on the viper object
|
||||||
// Useful for mapping an environmental variable to a key that does
|
// Useful for mapping an environmental variable to a key that does
|
||||||
// not match it.
|
// 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
|
v.envKeyReplacer = r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue