mirror of https://github.com/golang/go.git
doc: 1.12 release notes for go/doc, go/token, and reflect packages
Change-Id: I5f0ceeca2025cf19bcf610e150f7b7067fdd7397 Reviewed-on: https://go-review.googlesource.com/c/152637 Reviewed-by: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
parent
352f1b77c4
commit
fb69478ecd
|
|
@ -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 -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue