From 04b08da9af0c450d645ab7389d1467308cfc2db8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 4 Mar 2013 21:27:36 +0100 Subject: Imported Upstream version 1.1~hg20130304 --- doc/articles/godoc_documenting_go_code.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'doc/articles/godoc_documenting_go_code.html') 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/`}}

-They can also be detailed like the gob package's -overview. That package uses another convention for packages +They can also be detailed like the gob +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, doc.go, which contains only those comments and a package clause. @@ -80,10 +80,10 @@ sentence will appear in godoc's package list.

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 "BUG(who)” are recognized as known bugs, and included in -the "Bugs” section of the package documentation. The "who” part should be the +the word "BUG(who)" 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 bytes package: +known issue from the bytes package:

@@ -93,7 +93,7 @@ known issue from the bytes package:
 

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 godoc documentation and its corresponding doc.go file. @@ -137,3 +137,9 @@ indexing via the -path flag or just by running "godoc ."godoc documentation for more details.

+ +

+Godoc recognizes example functions written according to the +testing package's naming +conventions and presents them appropriately. +

-- cgit v1.2.3