From: Olivier Duperray Date: Mon, 11 Nov 2013 01:09:24 +0000 (+1100) Subject: cmd/godoc: document package-level examples X-Git-Tag: go1.3beta1~1350 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8f10c76471156ea2165816edcd370e290f420753;p=gostls13.git cmd/godoc: document package-level examples Fixes issue 5807 . R=golang-dev, adg CC=golang-dev https://golang.org/cl/23940043 --- diff --git a/src/pkg/testing/testing.go b/src/pkg/testing/testing.go index 5019e07626..52dc166dd9 100644 --- a/src/pkg/testing/testing.go +++ b/src/pkg/testing/testing.go @@ -73,17 +73,19 @@ // // Example functions without output comments are compiled but not executed. // -// The naming convention to declare examples for a function F, a type T and +// The naming convention to declare examples for the package, a function F, a type T and // method M on type T are: // +// func Example() { ... } // func ExampleF() { ... } // func ExampleT() { ... } // func ExampleT_M() { ... } // -// Multiple example functions for a type/function/method may be provided by +// Multiple example functions for a package/type/function/method may be provided by // appending a distinct suffix to the name. The suffix must start with a // lower-case letter. // +// func Example_suffix() { ... } // func ExampleF_suffix() { ... } // func ExampleT_suffix() { ... } // func ExampleT_M_suffix() { ... }