]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.17: fill in TODO for reflect package
authorJoe Tsai <joetsai@digital-static.net>
Fri, 7 May 2021 17:41:24 +0000 (10:41 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Fri, 7 May 2021 20:44:40 +0000 (20:44 +0000)
Updates #46019

Change-Id: I3025927d949ff72535542e89b83dd830e969c255
Reviewed-on: https://go-review.googlesource.com/c/go/+/318011
Trust: Joe Tsai <joetsai@digital-static.net>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
doc/go1.17.html

index 3cd324e0ab53e023104f7a158c639057aba089b3..894b8ae13366fc959edb6d8cc0f42d536cadc39f 100644 (file)
@@ -405,7 +405,13 @@ Do not send CLs removing the interior tags from such phrases.
 <dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
   <dd>
     <p><!-- CL 266197 -->
-      TODO: <a href="https://golang.org/cl/266197">https://golang.org/cl/266197</a>: add Method.IsExported and StructField.IsExported methods
+      The new
+      <a href="/pkg/reflect/#StructField.IsExported"><code>StructField.IsExported</code></a>
+      and
+      <a href="/pkg/reflect/#Method.IsExported"><code>Method.IsExported</code></a>
+      methods report whether a struct field or type method is exported.
+      They provide a more readable alternative to checking whether <code>PkgPath</code>
+      is empty.
     </p>
 
     <p><!-- CL 281233 -->