mirror of
https://github.com/spf13/viper
synced 2024-12-23 03:57:01 +00:00
viper.go: GetBoolSlice
This commit is contained in:
parent
0d3c5c6c30
commit
9341daefb3
1 changed files with 6 additions and 0 deletions
6
viper.go
6
viper.go
|
@ -684,6 +684,12 @@ func (v *Viper) GetDuration(key string) time.Duration {
|
||||||
return cast.ToDuration(v.Get(key))
|
return cast.ToDuration(v.Get(key))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetBoolSlice returns the value associated with the key as a slice of booleans.
|
||||||
|
func GetBoolSlice(key string) []bool { return v.GetBoolSlice(key) }
|
||||||
|
func (v *Viper) GetBoolSlice(key string) []bool {
|
||||||
|
return cast.ToBoolSlice(v.Get(key))
|
||||||
|
}
|
||||||
|
|
||||||
// GetDurationSlice returns the value associated with the key as a slice of durations.
|
// GetDurationSlice returns the value associated with the key as a slice of durations.
|
||||||
func GetDurationSlice(key string) []string { return v.GetDurationSlice(key) }
|
func GetDurationSlice(key string) []string { return v.GetDurationSlice(key) }
|
||||||
func (v *Viper) GetDurationSlice(key string) []string {
|
func (v *Viper) GetDurationSlice(key string) []string {
|
||||||
|
|
Loading…
Reference in a new issue