doc/go1.18: add docs on MapIter.Reset

From:

https://go-review.googlesource.com/c/go/+/321891

Updates #47694

Change-Id: I2cdd5d9f3da62a5690cd2ef921ed48957c602d64
Reviewed-on: https://go-review.googlesource.com/c/go/+/368360
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Jeremy Faller 2021-12-01 16:43:47 -05:00
parent bcb98f126b
commit f9b2733e3a

View file

@ -433,7 +433,13 @@ proposal</a>.
</p>
<p><!-- CL 321891 -->
TODO: <a href="https://golang.org/cl/321891">https://golang.org/cl/321891</a>: add MapIter.Reset
The new
<a href="/pkg/reflect/#MapIter.Reset"><code>MapIter.Reset</code></a>
method changes its receiver to iterate over a
different map. The use of
<a href="/pkg/reflect/#MapIter.Reset"><code>MapIter.Reset</code></a>
allows allocation-free iteration
over many maps.
</p>
<p><!-- CL 345486 -->