aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlberto Donizetti <alb.donizetti@gmail.com>2016-12-16 09:58:06 +0100
committerBrad Fitzpatrick <bradfitz@golang.org>2016-12-19 17:32:08 +0000
commit0919fd70682ee07e58eed6f95ff1f55541d3fecb (patch)
tree67eb79385bc4a4f034290f3bff37d885c188f9ad /src
parent75d367e34b42b8428d535122eadead87a0c11c8c (diff)
downloadgo-0919fd70682ee07e58eed6f95ff1f55541d3fecb.tar.xz
cmd/go: fix doc about examples with empty Output
Fixes #18191 Change-Id: Ic2bac9d2a6f42d14e780c74d9c842ee344ab030a Reviewed-on: https://go-review.googlesource.com/34512 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/go/alldocs.go3
-rw-r--r--src/cmd/go/test.go3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index b4807420b0..bf597c0383 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -1606,7 +1606,8 @@
// is compared exactly against the comment (see examples below). If the last
// comment begins with "Unordered output:" then the output is compared to the
// comment, however the order of the lines is ignored. An example with no such
-// comment, or with no text after "Output:" is compiled but not executed.
+// comment is compiled but not executed. An example with no text after
+// "Output:" is compiled, executed, and expected to produce no output.
//
// Godoc displays the body of ExampleXXX to demonstrate the use
// of the function, constant, or variable XXX. An example of a method M with
diff --git a/src/cmd/go/test.go b/src/cmd/go/test.go
index f27144c485..e0c0d6088c 100644
--- a/src/cmd/go/test.go
+++ b/src/cmd/go/test.go
@@ -334,7 +334,8 @@ If the last comment in the function starts with "Output:" then the output
is compared exactly against the comment (see examples below). If the last
comment begins with "Unordered output:" then the output is compared to the
comment, however the order of the lines is ignored. An example with no such
-comment, or with no text after "Output:" is compiled but not executed.
+comment is compiled but not executed. An example with no text after
+"Output:" is compiled, executed, and expected to produce no output.
Godoc displays the body of ExampleXXX to demonstrate the use
of the function, constant, or variable XXX. An example of a method M with