MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / IsValidKey

Function IsValidKey

pkg/config/config.go:122–130  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

120}
121
122func IsValidKey(key string) bool {
123 // Deliberate reach-out to the global viper instance here.
124 // A key is valid if the global viper knows about it; our 'newViper' doesn't know about anything
125 validKeys := viper.AllKeys()
126
127 key = strings.TrimSpace(key)
128 key = strings.ToLower(key)
129 return util.SliceContains(validKeys, key)
130}

Callers 4

getRunFunction · 0.92
setRunFunction · 0.92
promptMissingFunction · 0.92
SetMethod · 0.85

Calls 1

SliceContainsFunction · 0.92

Tested by

no test coverage detected