]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.18: add docs on FieldByIndexErr
authorJeremy Faller <jeremy@golang.org>
Wed, 1 Dec 2021 22:03:15 +0000 (17:03 -0500)
committerJeremy Faller <jeremy@golang.org>
Thu, 2 Dec 2021 22:06:10 +0000 (22:06 +0000)
From:
https://go-review.googlesource.com/c/go/+/357962/

Updates #47694

Change-Id: I2d43dcbd28c03457b55eada26e87f7710a113b0c
Reviewed-on: https://go-review.googlesource.com/c/go/+/368364
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>
doc/go1.18.html

index 5692a068abedb10b26af097244158d9b799f9685..8f0fc1fb71f6c3c528eb7d87f219031d63c13970 100644 (file)
@@ -459,7 +459,10 @@ proposal</a>.
     </p>
 
     <p><!-- CL 357962 -->
-      TODO: <a href="https://golang.org/cl/357962">https://golang.org/cl/357962</a>: add FieldByIndexErr
+      <a href="/pkg/reflect#Value.FieldByIndexErr"><code>Value.FieldByIndexErr</code></a>
+      has been added to avoid the panic that occurs in
+      <a href="/pkg/reflect#Value.FieldByIndex"><code>Value.FieldByIndex</code></a>
+      when stepping through a nil pointer to an embedded struct.
     </p>
   </dd>
 </dl><!-- reflect -->