(hostname, key, value string)
| 91 | } |
| 92 | |
| 93 | func (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 | |
| 106 | func (c *cfg) Write() error { |
| 107 | return ghConfig.Write(c.cfg) |
no test coverage detected