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