]> Cypherpunks repositories - gostls13.git/commitdiff
doc/effectivego: reword confusing sentence
authorRob Pike <r@golang.org>
Wed, 26 Oct 2016 02:14:20 +0000 (19:14 -0700)
committerRob Pike <r@golang.org>
Wed, 26 Oct 2016 16:09:54 +0000 (16:09 +0000)
For some reason git won't let me write

doc/effective_go.html: reword confusing sentence

or even

doc/effective_go: reword confusing sentence

as the subject line for this CL, but that's not important. The
actual CL just rewrites one sentence and adds an option to grep in
the associated example.

Fixes #15875

Change-Id: Iee159ea751caf4b73eacf3dfc86e29032646373f
Reviewed-on: https://go-review.googlesource.com/32110
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/effective_go.html

index e07c27ca2fffa2fd788f1422bc5895089687f8b9..e3f3124631f1450d2062f2747cff57530ac445c3 100644 (file)
@@ -245,15 +245,15 @@ func Compile(str string) (*Regexp, error) {
 </pre>
 
 <p>
-If the name always begins the comment, the output of <code>godoc</code>
-can usefully be run through <code>grep</code>.
+If every doc comment begins with the name of the item it describes,
+the output of <code>godoc</code> can usefully be run through <code>grep</code>.
 Imagine you couldn't remember the name "Compile" but were looking for
 the parsing function for regular expressions, so you ran
 the command,
 </p>
 
 <pre>
-$ godoc regexp | grep parse
+$ godoc regexp | grep -i parse
 </pre>
 
 <p>