i don't see any issue here. same behavior can be achieved with slices:
foo := make([]int, 0, 1000)
for {
for k := range bar {
foo = append(foo, k)
}
foo = foo[:0]
}
the slice will grow as much as the largest dataset. map will be the same. you need to let go of it to be GCd and create a new one.