MCPcopy
hub / github.com/spf13/viper / AutomaticEnv

Function AutomaticEnv

viper.go:1399–1399  ·  view source on GitHub ↗

AutomaticEnv makes Viper check if environment variables match any of the existing keys (config, default or flags). If matching env vars are found, they are loaded into Viper.

()

Source from the content-addressed store, hash-verified

1397// AutomaticEnv makes Viper check if environment variables match any of the existing keys
1398// (config, default or flags). If matching env vars are found, they are loaded into Viper.
1399func AutomaticEnv() { v.AutomaticEnv() }
1400
1401func (v *Viper) AutomaticEnv() {
1402 v.automaticEnvApplied = true

Callers

nothing calls this directly

Calls 1

AutomaticEnvMethod · 0.80

Tested by

no test coverage detected