Skip to content

Commit

Permalink
cmd/go: fix doc about examples with empty Output
Browse files Browse the repository at this point in the history
Fixes golang#18191

Change-Id: Ic2bac9d2a6f42d14e780c74d9c842ee344ab030a
Reviewed-on: https://go-review.googlesource.com/34512
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
ALTree authored and bradfitz committed Dec 19, 2016
1 parent 75d367e commit 0919fd7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cmd/go/alldocs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/cmd/go/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0919fd7

Please sign in to comment.