Skip to content

Commit

Permalink
fix: fix slice init length
Browse files Browse the repository at this point in the history
  • Loading branch information
huochexizhan authored and lbajolet-hashicorp committed Oct 29, 2024
1 parent 9076c7b commit 6e417bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packer/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ func (c *Core) renderVarsRecursively() (*interpolate.Context, error) {
Key string
Value string
}
sortedMap := make([]keyValue, len(repeatMap))
sortedMap := make([]keyValue, 0, len(repeatMap))
for _, k := range allKeys {
sortedMap = append(sortedMap, keyValue{k, repeatMap[k]})
}
Expand Down

0 comments on commit 6e417bb

Please sign in to comment.