g.org/doc/go1.11#performance-compiler
>
>
> On 12 August 2018 at 11:07, Peter Edge wrote:
> > With slices, you can do
> >
> > slice = slice[:0]
> >
> > to remove the values from the slice, but keep the backing slice with the
> > same capacity (although the el
With slices, you can do
slice = slice[:0]
to remove the values from the slice, but keep the backing slice with the
same capacity (although the elements aren't marked for GC I believe, if
that's a concern). With maps, is there a similar pattern? I've tried:
for key := range m {
delete(m, key)