From a51b73284f48a6028024e0e4df81e3a9934a9a4a Mon Sep 17 00:00:00 2001 From: jackspirou Date: Thu, 30 Jul 2015 15:27:34 -0500 Subject: [PATCH] adding GetStringMapStringSlice method --- viper.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/viper.go b/viper.go index f2c09ce..9326299 100644 --- a/viper.go +++ b/viper.go @@ -455,6 +455,12 @@ func (v *Viper) GetStringMapString(key string) map[string]string { 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 // in bytes. func GetSizeInBytes(key string) uint { return v.GetSizeInBytes(key) }