]> Cypherpunks repositories - gostls13.git/commitdiff
doc/effective_go: make function signature match function body
authorBrett Cannon <bcannon@gmail.com>
Fri, 8 May 2015 14:41:15 +0000 (10:41 -0400)
committerRob Pike <r@golang.org>
Fri, 8 May 2015 17:01:24 +0000 (17:01 +0000)
In the Slices section of Effective Go, the os package's File.Read
function is used as an example. Unfortunately the function signature
does not match the function's code in the example, nor the os package's
documentation. This change updates the function signature to match
the os package and the pre-existing function code.

Change-Id: Iae9f30c898d3a1ff8d47558ca104dfb3ff07112c
Reviewed-on: https://go-review.googlesource.com/9845
Reviewed-by: Rob Pike <r@golang.org>
doc/effective_go.html

index d6be37994b1fc60f865076d0b635e322a1f399e9..8a827d04335ec798028e8a5bf547d594ac7f3843 100644 (file)
@@ -1382,7 +1382,7 @@ limit of how much data to read.  Here is the signature of the
 <code>os</code>:
 </p>
 <pre>
-func (file *File) Read(buf []byte) (n int, err error)
+func (f *File) Read(buf []byte) (n int, err error)
 </pre>
 <p>
 The method returns the number of bytes read and an error value, if