1
0
mirror of https://github.com/golang/go synced 2024-11-26 16:16:57 -07:00

doc/effectivego: reword confusing sentence

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>
This commit is contained in:
Rob Pike 2016-10-25 19:14:20 -07:00
parent 3193c71c5b
commit cec84f7309

View 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>