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