mirror of
https://github.com/spf13/viper
synced 2025-05-11 22:57:21 +00:00
Make SetEnvKeyReplacer similar to EnvKeyReplacer in signature so you can actually write a different implementation
This commit is contained in:
parent
36be6bf91f
commit
d652670db2
1 changed files with 2 additions and 2 deletions
4
viper.go
4
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue