replace SetEnvReplacer by SetEnvKeyReplacer

This commit is contained in:
rougepied 2016-07-27 16:56:48 +02:00 committed by GitHub
parent b53595fb56
commit fa88aecca5

View file

@ -184,7 +184,7 @@ with ENV:
* `AutomaticEnv()`
* `BindEnv(string...) : error`
* `SetEnvPrefix(string)`
* `SetEnvReplacer(string...) *strings.Replacer`
* `SetEnvKeyReplacer(string...) *strings.Replacer`
_When working with ENV variables, its important to recognize that Viper
treats ENV variables as case sensitive._
@ -211,7 +211,7 @@ time a `viper.Get` request is made. It will apply the following rules. It will
check for a environment variable with a name matching the key uppercased and
prefixed with the `EnvPrefix` if set.
`SetEnvReplacer` allows you to use a `strings.Replacer` object to rewrite Env
`SetEnvKeyReplacer` allows you to use a `strings.Replacer` object to rewrite Env
keys to an extent. This is useful if you want to use `-` or something in your
`Get()` calls, but want your environmental variables to use `_` delimiters. An
example of using it can be found in `viper_test.go`.