Skip to content

Commit 817c5c4

Browse files
doc/go1.14: mention go/doc.NewFromFiles and associated new data fields
Updates #23864 Updates #36878 Change-Id: I6efdaafbe5207c625643f201a5931ad735941365 Reviewed-on: https://go-review.googlesource.com/c/go/+/217125 Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 25d0ffe commit 817c5c4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

doc/go1.14.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,26 @@ <h2 id="library">Core library</h2>
482482

483483
</dl><!-- encoding/json -->
484484

485+
<dl id="go/doc"><dt><a href="/go/doc/">go/doc</a></dt>
486+
<dd>
487+
<p><!-- CL 204830 -->
488+
The new
489+
function <a href="/pkg/go/doc/#NewFromFiles"><code>NewFromFiles</code></a>
490+
computes package documentation from a list
491+
of <code>*ast.File</code>'s and associates examples with the
492+
appropriate package elements.
493+
The new information is available in a new <code>Examples</code>
494+
field
495+
in the <a href="/pkg/go/doc/#Package"><code>Package</code></a>, <a href="/pkg/go/doc/#Type"><code>Type</code></a>,
496+
and <a href="/pkg/go/doc/#Func"><code>Func</code></a> types, and a
497+
new <a href="/pkg/go/doc/#Example.Suffix"><code>Suffix</code></a>
498+
field in
499+
the <a href="/pkg/go/doc/#Example"><code>Example</code></a>
500+
type.
501+
</p>
502+
</dd>
503+
</dl><!-- go/doc -->
504+
485505
<dl id="mime"><dt><a href="/pkg/mime/">mime</a></dt>
486506
<dd>
487507
<p><!-- CL 186927 -->

0 commit comments

Comments
 (0)