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

Method IsSet

viper.go:1391–1395  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

1389func IsSet(key string) bool { return v.IsSet(key) }
1390
1391func (v *Viper) IsSet(key string) bool {
1392 lcaseKey := strings.ToLower(key)
1393 val := v.find(lcaseKey, false)
1394 return val != nil
1395}
1396
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.

Callers 2

TestIsSetFunction · 0.80
IsSetFunction · 0.80

Calls 1

findMethod · 0.95

Tested by 1

TestIsSetFunction · 0.64