]> Cypherpunks repositories - gostls13.git/commitdiff
doc/effective_go.html: fix typo
authorRob Pike <r@golang.org>
Thu, 20 Mar 2014 21:37:27 +0000 (08:37 +1100)
committerRob Pike <r@golang.org>
Thu, 20 Mar 2014 21:37:27 +0000 (08:37 +1100)
Prose referred to 'b', code used 'buf'.
Fixes #7601.

LGTM=dominik.honnef
R=golang-codereviews, dominik.honnef
CC=golang-codereviews
https://golang.org/cl/78470043

doc/effective_go.html

index 74f9f3db9f24bf7729ed684795b88ab3328e4bf7..6006724e5a940b1a4b83b3b6040bd772ac47da08 100644 (file)
@@ -1386,8 +1386,9 @@ func (file *File) Read(buf []byte) (n int, err error)
 </pre>
 <p>
 The method returns the number of bytes read and an error value, if
-any.  To read into the first 32 bytes of a larger buffer
-<code>b</code>, <i>slice</i> (here used as a verb) the buffer.
+any.
+To read into the first 32 bytes of a larger buffer
+<code>buf</code>, <i>slice</i> (here used as a verb) the buffer.
 </p>
 <pre>
     n, err := f.Read(buf[0:32])
@@ -1488,7 +1489,7 @@ If the slices might grow or shrink, they should be allocated independently
 to avoid overwriting the next line; if not, it can be more efficient to construct
 the object with a single allocation.
 For reference, here are sketches of the two methods.
-First, a line a time:
+First, a line at a time:
 </p>
 
 <pre>