Commit 0919fd70 authored by Alberto Donizetti's avatar Alberto Donizetti Committed by Brad Fitzpatrick

cmd/go: fix doc about examples with empty Output

Fixes #18191

Change-Id: Ic2bac9d2a6f42d14e780c74d9c842ee344ab030a
Reviewed-on: https://go-review.googlesource.com/34512Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 75d367e3
...@@ -1606,7 +1606,8 @@ ...@@ -1606,7 +1606,8 @@
// is compared exactly against the comment (see examples below). If the last // 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 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, 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 // Godoc displays the body of ExampleXXX to demonstrate the use
// of the function, constant, or variable XXX. An example of a method M with // of the function, constant, or variable XXX. An example of a method M with
......
...@@ -334,7 +334,8 @@ If the last comment in the function starts with "Output:" then the output ...@@ -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 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 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, 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 Godoc displays the body of ExampleXXX to demonstrate the use
of the function, constant, or variable XXX. An example of a method M with of the function, constant, or variable XXX. An example of a method M with
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment