MCPcopy Index your code
hub / github.com/cli/cli / Set

Method Set

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

Source from the content-addressed store, hash-verified

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

Callers 2

NewFromStringFunction · 0.95
MigrateMethod · 0.95

Calls 2

SetMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected