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

Function Get

viper.go:714–714  ·  viper.go::Get

Get can retrieve any value given the key to use. Get is case-insensitive for a key. Get has the behavior of returning the value associated with the first place from where it is set. Viper will check in the following order: override, flag, env, config file, key/value store, default Get returns an in

(key string)

Source from the content-addressed store, hash-verified

712//
713// Get returns an interface. For a specific value use one of the Get____ methods.
714func Get(key string) any { return v.Get(key) }
715
716func (v *Viper) Get(key string) any {
717 lcaseKey := strings.ToLower(key)

Callers 2

TestBindFlagValueSetFunction · 0.85
TestBindFlagValueFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by 2

TestBindFlagValueSetFunction · 0.68
TestBindFlagValueFunction · 0.68