Fetcher provides an interface to get typed information out of a configuration "source". These sources could be the OS environment, a .gitconfig, or even just a `map`.
| 4 | // "source". These sources could be the OS environment, a .gitconfig, or even |
| 5 | // just a `map`. |
| 6 | type Fetcher interface { |
| 7 | // Get returns the string value associated with a given key and a bool |
| 8 | // determining if the key exists. |
| 9 | // |
| 10 | // If multiple entries match the given key, the first one will be |
| 11 | // returned. |
| 12 | Get(key string) (val string, ok bool) |
| 13 | |
| 14 | // GetAll returns the a set of string values associated with a given |
| 15 | // key. If no entries matched the given key, an empty slice will be |
| 16 | // returned instead. |
| 17 | GetAll(key string) (vals []string) |
| 18 | |
| 19 | // All returns a copy of all the key/value pairs for the current |
| 20 | // environment. |
| 21 | All() map[string][]string |
| 22 | } |
no outgoing calls
no test coverage detected