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