Commit cec84f73 authored by Rob Pike's avatar Rob Pike

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/32110Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 3193c71c
...@@ -245,15 +245,15 @@ func Compile(str string) (*Regexp, error) { ...@@ -245,15 +245,15 @@ func Compile(str string) (*Regexp, error) {
</pre> </pre>
<p> <p>
If the name always begins the comment, the output of <code>godoc</code> If every doc comment begins with the name of the item it describes,
can usefully be run through <code>grep</code>. 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 Imagine you couldn't remember the name "Compile" but were looking for
the parsing function for regular expressions, so you ran the parsing function for regular expressions, so you ran
the command, the command,
</p> </p>
<pre> <pre>
$ godoc regexp | grep parse $ godoc regexp | grep -i parse
</pre> </pre>
<p> <p>
......
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