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

Method GetString

viper.go:792–794  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

790func GetString(key string) string { return v.GetString(key) }
791
792func (v *Viper) GetString(key string) string {
793 return cast.ToString(v.Get(key))
794}
795
796// GetBool returns the value associated with the key as a boolean.
797func GetBool(key string) bool { return v.GetBool(key) }

Callers 15

TestDirsSearchFunction · 0.80
TestWriteConfigTOMLFunction · 0.80
TestWriteConfigDotEnvFunction · 0.80
TestMergeConfigFunction · 0.80
TestMergeConfigNoMergeFunction · 0.80
TestShadowedNestedValueFunction · 0.80
TestKeyDelimiterFunction · 0.80
TestSliceIndexAccessFunction · 0.80
TestFlagShadowFunction · 0.80

Calls 1

GetMethod · 0.95

Tested by 14

TestDirsSearchFunction · 0.64
TestWriteConfigTOMLFunction · 0.64
TestWriteConfigDotEnvFunction · 0.64
TestMergeConfigFunction · 0.64
TestMergeConfigNoMergeFunction · 0.64
TestShadowedNestedValueFunction · 0.64
TestKeyDelimiterFunction · 0.64
TestSliceIndexAccessFunction · 0.64
TestFlagShadowFunction · 0.64