Skip to content

Commit

Permalink
Added capacity to slice creation
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekv96 authored and sagikazarmark committed Nov 1, 2019
1 parent 40e41dd commit 72b022e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion viper.go
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ func (v *Viper) AllKeys() []string {
m = v.flattenAndMergeMap(m, v.defaults, "")

// convert set of paths to list
a := []string{}
a := make([]string, 0, len(m))
for x := range m {
a = append(a, x)
}
Expand Down

0 comments on commit 72b022e

Please sign in to comment.