]> Cypherpunks repositories - gostls13.git/commitdiff
os: adjust (*File).Read comment
authorRuss Cox <rsc@golang.org>
Thu, 27 Oct 2016 02:02:12 +0000 (22:02 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 28 Oct 2016 19:19:11 +0000 (19:19 +0000)
Fixes #6639.

Change-Id: Iefce87c5521504fd41843df8462cfd840c24410f
Reviewed-on: https://go-review.googlesource.com/32102
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/os/file.go

index 934004f084b7e494b2ed62498c74aec2a8415e2c..b9c10b2a2824499df84203cbaffa8ad6abc613ca 100644 (file)
@@ -92,8 +92,8 @@ func (e *LinkError) Error() string {
 }
 
 // Read reads up to len(b) bytes from the File.
-// It returns the number of bytes read and an error, if any.
-// EOF is signaled by a zero count with err set to io.EOF.
+// It returns the number of bytes read and any error encountered.
+// At end of file, Read returns 0, io.EOF.
 func (f *File) Read(b []byte) (n int, err error) {
        if err := f.checkValid("read"); err != nil {
                return 0, err