git-lfs/config/map_fetcher.go
2016-08-04 18:58:43 -06:00

13 lines
343 B
Go

package config
// mapFetcher provides an implementation of the Fetcher interface by wrapping
// the `map[string]string` type.
type mapFetcher map[string]string
func MapFetcher(m map[string]string) Fetcher {
return mapFetcher(m)
}
// Get implements the func `Fetcher.Get`.
func (m mapFetcher) Get(key string) (val string) { return m[key] }