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