adding GetStringMapStringSlice method

This commit is contained in:
jackspirou 2015-07-30 15:27:34 -05:00 committed by spf13
parent 9fca10189b
commit b9316c3299
1 changed files with 6 additions and 0 deletions

View File

@ -465,6 +465,12 @@ func (v *Viper) GetStringMapString(key string) map[string]string {
return cast.ToStringMapString(v.Get(key)) return cast.ToStringMapString(v.Get(key))
} }
// Returns the value associated with the key as a map to a slice of strings
func GetStringMapStringSlice(key string) map[string]string { return v.GetStringMapStringSlice(key) }
func (v *Viper) GetStringMapStringSlice(key string) map[string]string {
return cast.ToStringMapStringSlice(v.Get(key))
}
// Returns the size of the value associated with the given key // Returns the size of the value associated with the given key
// in bytes. // in bytes.
func GetSizeInBytes(key string) uint { return v.GetSizeInBytes(key) } func GetSizeInBytes(key string) uint { return v.GetSizeInBytes(key) }