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

Method Set

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

Source from the content-addressed store, hash-verified

103}
104
105func (c *cfg) Set(hostname, key, value string) {
106 if hostname == "" {
107 c.cfg.Set([]string{key}, value)
108 return
109 }
110
111 c.cfg.Set([]string{hostsKey, hostname, key}, value)
112
113 if user, _ := c.cfg.Get([]string{hostsKey, hostname, userKey}); user != "" {
114 c.cfg.Set([]string{hostsKey, hostname, usersKey, user, key}, value)
115 }
116}
117
118func (c *cfg) Write() error {
119 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