Skip to content

Commit 81484cf

Browse files
committed
doc: document new reflect.SetIter{Key,Value} functions
Update #48294 Update #47694 Change-Id: I4d4c01be74a9736d89a4ec92318ce29ff7289a0d Reviewed-on: https://go-review.googlesource.com/c/go/+/356050 Trust: Keith Randall <[email protected]> Reviewed-by: Joe Tsai <[email protected]>
1 parent 8dab959 commit 81484cf

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

doc/go1.18.html

+14-1
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,25 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
127127
</dd>
128128
</dl><!-- image/draw -->
129129

130+
<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
131+
<dd>
132+
<p><!-- CL 356049, 320929 -->
133+
The new
134+
<a href="/pkg/reflect/#Value.SetIterKey"><code>Value.SetIterKey</code></a>
135+
and <a href="/pkg/reflect/#Value.SetIterValue"><code>Value.SetIterValue</code></a>
136+
methods set a Value using a map iterator as the source. They are equivalent to
137+
<code>Value.Set(iter.Key())</code> and <code>Value.Set(iter.Value())</code> but
138+
do fewer allocations.
139+
</p>
140+
</dd>
141+
</dl><!-- reflect -->
142+
130143
<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
131144
<dd>
132145
<p><!-- CL 336550 -->
133146
The new function <a href="/pkg/syscall/?GOOS=windows#SyscallN"><code>SyscallN</code></a>
134147
has been introduced for Windows, allowing for calls with arbitrary number
135-
of arguments. As results,
148+
of arguments. As a result,
136149
<a href="/pkg/syscall/?GOOS=windows#Syscall"><code>Syscall</code></a>,
137150
<a href="/pkg/syscall/?GOOS=windows#Syscall6"><code>Syscall6</code></a>,
138151
<a href="/pkg/syscall/?GOOS=windows#Syscall9"><code>Syscall9</code></a>,

0 commit comments

Comments
 (0)