From bd69d2dd34ce26b379b70a92c4c05d2f20b944e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Sur=C3=A1nyi?= Date: Thu, 8 Jan 2015 08:36:07 +0900 Subject: [PATCH] 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 --- cmd/godoc/doc.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/godoc/doc.go b/cmd/godoc/doc.go index dd7f3c1a..17cf23e5 100644 --- a/cmd/godoc/doc.go +++ b/cmd/godoc/doc.go @@ -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