fix: fix slice init length

This commit is contained in:
huochexizhan 2024-10-01 23:42:25 +08:00 committed by Lucas Bajolet
parent 9076c7b24a
commit 6e417bb883

View file

@ -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]})
}