docs: improve AutomaticEnv documentation

Fixes #1000

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
Mark Sagi-Kazar 2020-10-08 02:46:11 +02:00
parent 33bcdc91ea
commit 8c89438499
No known key found for this signature in database
GPG key ID: 34CC109EB5ED1C2A

View file

@ -1292,8 +1292,8 @@ func (v *Viper) IsSet(key string) bool {
return val != nil return val != nil
} }
// AutomaticEnv has Viper check ENV variables for all. // AutomaticEnv makes Viper check if environment variables match any of the existing keys
// keys set in config, default & flags // (config, default or flags). If matching env vars are found, they are loaded into Viper.
func AutomaticEnv() { v.AutomaticEnv() } func AutomaticEnv() { v.AutomaticEnv() }
func (v *Viper) AutomaticEnv() { func (v *Viper) AutomaticEnv() {