Commit 0be2ef3f authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

io: clarify that ReadAt shouldn't move the seek offset

R=r, mkrautz, r2, rsc
CC=golang-dev
https://golang.org/cl/4415041
parent a5ca6352
......@@ -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)
}
......
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