summaryrefslogtreecommitdiff
path: root/doc/articles/godoc_documenting_go_code.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/articles/godoc_documenting_go_code.html')
-rw-r--r--doc/articles/godoc_documenting_go_code.html18
1 files changed, 12 insertions, 6 deletions
diff --git a/doc/articles/godoc_documenting_go_code.html b/doc/articles/godoc_documenting_go_code.html
index ca66076ad..18a3ee953 100644
--- a/doc/articles/godoc_documenting_go_code.html
+++ b/doc/articles/godoc_documenting_go_code.html
@@ -65,8 +65,8 @@ package's brief description:
{{code "/src/pkg/sort/sort.go" `/Package sort provides/` `/package sort/`}}
<p>
-They can also be detailed like the <a href="/pkg/encoding/gob/">gob package</a>'s
-overview. That package uses another convention for packages
+They can also be detailed like the <a href="/pkg/encoding/gob/"><code>gob</code></a>
+package's overview. That package uses another convention for packages
that need large amounts of introductory documentation: the package comment is
placed in its own file, <a href="/src/pkg/encoding/gob/doc.go">doc.go</a>, which
contains only those comments and a package clause.
@@ -80,10 +80,10 @@ sentence will appear in godoc's <a href="/pkg/">package list</a>.
<p>
Comments that are not adjacent to a top-level declaration are omitted from
godoc's output, with one notable exception. Top-level comments that begin with
-the word <code>"BUG(who)”</code> are recognized as known bugs, and included in
-the "Bugs” section of the package documentation. The "who” part should be the
+the word <code>"BUG(who)"</code> are recognized as known bugs, and included in
+the "Bugs" section of the package documentation. The "who" part should be the
user name of someone who could provide more information. For example, this is a
-known issue from the <a href="/pkg/bytes/#bugs">bytes package</a>:
+known issue from the <a href="/pkg/bytes/#pkg-bugs"><code>bytes</code></a> package:
</p>
<pre>
@@ -93,7 +93,7 @@ known issue from the <a href="/pkg/bytes/#bugs">bytes package</a>:
<p>
Godoc treats executable commands somewhat differently. Instead of inspecting the
command source code, it looks for a Go source file belonging to the special
-package "documentation”. The comment on the "package documentation” clause is
+package "documentation". The comment on the "package documentation" clause is
used as the command's documentation. For example, see the
<a href="/cmd/godoc/">godoc documentation</a> and its corresponding
<a href="/src/cmd/godoc/doc.go">doc.go</a> file.
@@ -137,3 +137,9 @@ indexing via the <code>-path</code> flag or just by running <code>"godoc ."</cod
in the source directory. See the <a href="/cmd/godoc/">godoc documentation</a>
for more details.
</p>
+
+<p>
+Godoc recognizes example functions written according to the
+<a href="/pkg/testing/#pkg-overview"><code>testing</code></a> package's naming
+conventions and presents them appropriately.
+</p>