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

Method Set

internal/config/config.go:95–106  ·  view source on GitHub ↗
(hostname, key, value string)

Source from the content-addressed store, hash-verified

93}
94
95func (c *cfg) Set(hostname, key, value string) {
96 if hostname == "" {
97 c.cfg.Set([]string{key}, value)
98 return
99 }
100
101 c.cfg.Set([]string{hostsKey, hostname, key}, value)
102
103 if user, _ := c.cfg.Get([]string{hostsKey, hostname, userKey}); user != "" {
104 c.cfg.Set([]string{hostsKey, hostname, usersKey, user, key}, value)
105 }
106}
107
108func (c *cfg) Write() error {
109 return ghConfig.Write(c.cfg)

Callers 2

NewMockConfigFromStringFunction · 0.95
MigrateMethod · 0.95

Calls 2

SetMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected