]> Cypherpunks repositories - gostls13.git/commitdiff
io: clarify that ReadAt shouldn't move the seek offset
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 13 Apr 2011 18:18:38 +0000 (11:18 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 13 Apr 2011 18:18:38 +0000 (11:18 -0700)
R=r, mkrautz, r2, rsc
CC=golang-dev
https://golang.org/cl/4415041

src/pkg/io/io.go

index c0bc54d0d4e8c37f264942d233d6476055b13d56..d3707eb1dba6f97d60c33065e006c81b5620cdce 100644 (file)
@@ -136,6 +136,10 @@ type WriterTo interface {
 // At the end of the input stream, ReadAt returns 0, os.EOF.
 // ReadAt may return a non-zero number of bytes with a non-nil err.
 // In particular, a ReadAt that exhausts the input may return n > 0, os.EOF.
+//
+// If ReadAt is reading from an data stream with a seek offset,
+// ReadAt should not affect nor be affected by the underlying
+// seek offset.
 type ReaderAt interface {
        ReadAt(p []byte, off int64) (n int, err os.Error)
 }