mirror of
https://github.com/spf13/viper
synced 2024-12-22 19:47:01 +00:00
Added capacity to slice creation
This commit is contained in:
parent
40e41dd224
commit
72b022eb35
1 changed files with 1 additions and 1 deletions
2
viper.go
2
viper.go
|
@ -1723,7 +1723,7 @@ func (v *Viper) AllKeys() []string {
|
||||||
m = v.flattenAndMergeMap(m, v.defaults, "")
|
m = v.flattenAndMergeMap(m, v.defaults, "")
|
||||||
|
|
||||||
// convert set of paths to list
|
// convert set of paths to list
|
||||||
a := []string{}
|
a := make([]string, 0, len(m))
|
||||||
for x := range m {
|
for x := range m {
|
||||||
a = append(a, x)
|
a = append(a, x)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue