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