cmd/godoc: mention examples feature in godoc

Godoc documentation did not mention the feature for showing example code
runnable by the testing package. Add a link to the testing package.

Update golang/go#9471

Change-Id: Ic15794c59732e9b0b42c5b16c60be0a47c41afa5
Reviewed-on: https://go-review.googlesource.com/2490
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Péter Surányi 2015-01-08 08:36:07 +09:00 committed by Andrew Gerrand
parent 2cd6e42cb2
commit bd69d2dd34
1 changed files with 2 additions and 0 deletions

View File

@ -137,6 +137,8 @@ one may run godoc as follows:
Godoc documentation is converted to HTML or to text using the go/doc package;
see http://golang.org/pkg/go/doc/#ToHTML for the exact rules.
Godoc also shows example code that is runnable by the testing package;
see http://golang.org/pkg/testing/#hdr-Examples for the conventions.
See "Godoc: documenting Go code" for how to write good comments for godoc:
http://golang.org/doc/articles/godoc_documenting_go_code.html