1
0
mirror of https://github.com/golang/go synced 2024-11-22 05:04:40 -07:00

doc/go1.html: fix broken links

R=r
CC=golang-dev
https://golang.org/cl/5555060
This commit is contained in:
Robert Griesemer 2012-01-20 12:57:43 -08:00
parent c088ebef16
commit 6923f6d12a

View File

@ -948,19 +948,21 @@ for that purpose.
<p> <p>
The set of parse functions provided by the <a href="/pkg/go/parser/"><code>go/parser</code></a> The set of parse functions provided by the <a href="/pkg/go/parser/"><code>go/parser</code></a>
package has been reduced to the primary parse function package has been reduced to the primary parse function
<a href="go/parser/#ParseFile"><code>ParseFile</code></a>, and a couple of <a href="/pkg/go/parser/#ParseFile"><code>ParseFile</code></a>, and a couple of
convenience functions <a href="go/parser/#ParseDir"><code>ParseDir</code></a> convenience functions <a href="/pkg/go/parser/#ParseDir"><code>ParseDir</code></a>
and <a href="go/parser/#ParseExpr"><code>ParseExpr</code></a>. and <a href="/pkg/go/parser/#ParseExpr"><code>ParseExpr</code></a>.
</p> </p>
<p> <p>
The type names of the <a href="go/doc/"><code>go/doc</code></a> package have been The type names of the <a href="/pkg/go/doc/"><code>go/doc</code></a> package have been
streamlined by removing the <code>Doc</code> suffix: <code>PackageDoc</code> streamlined by removing the <code>Doc</code> suffix: <code>PackageDoc</code>
is now <code>Package</code>, <code>ValueDoc</code> is <code>Value</code>, etc. is now <a href="/pkg/go/doc/#Package"><code>Package</code></a>, <code>ValueDoc</code>
is <a href="/pkg/go/doc/#Value"><code>Value</code></a>, etc.
Also, all types now consistently have a <code>Name</code> field (or <code>Names</code>, Also, all types now consistently have a <code>Name</code> field (or <code>Names</code>,
in the case of type <code>Value</code>), <code>Type.Factories</code> has become in the case of type <code>Value</code>), <code>Type.Factories</code> has become
<code>Type.Funcs</code>, and there is a new type <code>Method</code> that describes <code>Type.Funcs</code>, and there is a new type
methods in more detail. <a href="/pkg/go/doc/#Method"><code>Method</code></a> that describes methods in
more detail.
Instead of calling <code>doc.NewPackageDoc(pkg, importpath)</code>, Instead of calling <code>doc.NewPackageDoc(pkg, importpath)</code>,
documentation for a package is created with: documentation for a package is created with:
</p> </p>
@ -970,29 +972,29 @@ documentation for a package is created with:
</pre> </pre>
<p> <p>
where the new <code>mode</code> parameter specifies the operation mode: where the new <code>mode</code> parameter specifies the operation
if set to <a href="go/doc/#AllDecls"><code>AllDecls</code></a>, all declarations <a href="/pkg/go/doc/#Mode"><code>Mode</code></a>: if set to
(not just exported ones) are considered. <code>AllDecls</code>, all declarations (not just exported ones) are considered.
The function <code>NewFileDoc</code> was removed, and the function The function <code>NewFileDoc</code> was removed, and the function
<code>CommentText</code> has become the method <code>CommentText</code> has become the method
<a href="go/ast/#Text"><code>Text</code></a> of <a href="/pkg/go/ast/#CommentGroup.Text"><code>Text</code></a> of
<a href="go/ast/#CommentGroup"><code>ast.CommentGroup</code></a>. <a href="/pkg/go/ast/#CommentGroup"><code>ast.CommentGroup</code></a>.
</p> </p>
<p> <p>
In package <a href="go/token/"><code>go/token</code></a>, the In package <a href="/pkg/go/token/"><code>go/token</code></a>, the
<a href="go/token/#FileSet"><code>token.FileSet</code></a> method <code>Files</code> <a href="/pkg/go/token/#FileSet"><code>token.FileSet</code></a> method <code>Files</code>
(which originally returned a channel of <code>*token.File</code>s) has been replaced (which originally returned a channel of <code>*token.File</code>s) has been replaced
with the iterator <a href="go/token/#FileSet.Iterate"><code>Iterate</code></a> that with the iterator <a href="/pkg/go/token/#FileSet.Iterate"><code>Iterate</code></a> that
accepts a function argument instead. accepts a function argument instead.
</p> </p>
<p> <p>
<em>Updating</em>: <em>Updating</em>:
Code that uses packages in <code>go</code> will have to be updated by hand; the Code that uses these packages in <a href="/pkg/go/">go</a> will have to be updated by hand;
compiler will reject incorrect uses. Templates used in conjuction with any of the the compiler will reject incorrect uses. Templates used in conjuction with any of the
<code>go/doc</code> types may need manual fixes; the renamed fields will lead <a href="/pkg/go/doc/"><code>go/doc</code></a> types may need manual fixes; the renamed
to run-time errors. fields will lead to run-time errors.
</p> </p>
<h3 id="exp">The package tree exp</h3> <h3 id="exp">The package tree exp</h3>