(hostname, key string)
| 54 | } |
| 55 | |
| 56 | func (c *cfg) get(hostname, key string) o.Option[string] { |
| 57 | if hostname != "" { |
| 58 | val, err := c.cfg.Get([]string{hostsKey, hostname, key}) |
| 59 | if err == nil { |
| 60 | return o.Some(val) |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | val, err := c.cfg.Get([]string{key}) |
| 65 | if err == nil { |
| 66 | return o.Some(val) |
| 67 | } |
| 68 | |
| 69 | return o.None[string]() |
| 70 | } |
| 71 | |
| 72 | func (c *cfg) GetOrDefault(hostname, key string) o.Option[gh.ConfigEntry] { |
| 73 | if val := c.get(hostname, key); val.IsSome() { |
no test coverage detected