]> Cypherpunks repositories - gostls13.git/commitdiff
doc: 1.12 release notes for go/doc, go/token, and reflect packages
authorKatie Hockman <katie@golang.org>
Tue, 4 Dec 2018 21:23:39 +0000 (16:23 -0500)
committerKatie Hockman <katie@golang.org>
Wed, 5 Dec 2018 22:13:32 +0000 (22:13 +0000)
Change-Id: I5f0ceeca2025cf19bcf610e150f7b7067fdd7397
Reviewed-on: https://go-review.googlesource.com/c/152637
Reviewed-by: Andrew Bonventre <andybons@golang.org>
doc/go1.12.html

index f452d136c08837dbd784dd5121cec7d4b8c5c61f..c8dd487f65fe7284090ae1800132d4e9b6ee4db3 100644 (file)
@@ -270,7 +270,9 @@ for {
 <dl id="go/doc"><dt><a href="/pkg/go/doc/">go/doc</a></dt>
   <dd>
     <p><!-- CL 140958 -->
-      TODO: <a href="https://golang.org/cl/140958">https://golang.org/cl/140958</a>: add new mode bit PreserveAST to control clearing of data in AST
+      To address some outstanding issues in <a href="/cmd/doc/"><code>cmd/doc</code></a>,
+      this package has a new <a href="/pkg/go/doc/#Mode"><code>Mode</code></a> bit,
+      <code>PreserveAST</code>, which controls whether AST data is cleared.
     </p>
 
 </dl><!-- go/doc -->
@@ -278,7 +280,11 @@ for {
 <dl id="go/token"><dt><a href="/pkg/go/token/">go/token</a></dt>
   <dd>
     <p><!-- CL 134075 -->
-      TODO: <a href="https://golang.org/cl/134075">https://golang.org/cl/134075</a>: add (*File).LineStart, which returns Pos for a given line
+      The <a href="/pkg/go/token#File"><code>File</code></a> type has a new
+      <a href="/pkg/go/token#File.LineStart"><code>LineStart</code></a> field,
+      which returns the position of the start of a given line. This is especially useful
+      in programs that occassionally handle non-Go files, such as assembly, but wish to use
+      the <code>token.Pos</code> mechanism to identify file positions.
     </p>
 
 </dl><!-- go/token -->
@@ -442,7 +448,12 @@ for {
 <dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
   <dd>
     <p><!-- CL 33572 -->
-      TODO: <a href="https://golang.org/cl/33572">https://golang.org/cl/33572</a>: add Value.MapRange method and MapIter type
+      A new <a href="/pkg/reflect#MapIter"><code>MapIter</code></a> type is
+      an iterator for ranging over a map. This type is exposed through the
+      <a href="/pkg/reflect#Value"><code>Value</code></a> type's new
+      <a href="/pkg/reflect#Value.MapRange"><code>MapRange</code></a> method.
+      This follows the same iteration semantics as a range statment, with <code>Next</code>
+      to advance the iterator, and <code>Key</code>/<code>Value</code> to access each entry.
     </p>
 
 </dl><!-- reflect -->