MCPcopy Create free account
hub / github.com/cli/cli / ValidateKey

Function ValidateKey

pkg/cmd/config/set/set.go:96–104  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

94}
95
96func ValidateKey(key string) error {
97 for _, configKey := range config.Options {
98 if key == configKey.Key {
99 return nil
100 }
101 }
102
103 return fmt.Errorf("invalid key")
104}
105
106func isPerHostOnly(key string) bool {
107 for _, configKey := range config.Options {

Callers 2

setRunFunction · 0.85
Test_ValidateKeyFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by 1

Test_ValidateKeyFunction · 0.68