mirror of
https://github.com/golang/go.git
synced 2025-05-16 21:04:38 +00:00
io: more docs on WriterAt
Updates #1599 R=golang-dev, gri, rsc CC=golang-dev https://golang.org/cl/5774043
This commit is contained in:
parent
4aab8806e7
commit
0210f4137b
@ -173,6 +173,13 @@ type ReaderAt interface {
|
|||||||
// at offset off. It returns the number of bytes written from p (0 <= n <= len(p))
|
// at offset off. It returns the number of bytes written from p (0 <= n <= len(p))
|
||||||
// and any error encountered that caused the write to stop early.
|
// and any error encountered that caused the write to stop early.
|
||||||
// WriteAt must return a non-nil error if it returns n < len(p).
|
// WriteAt must return a non-nil error if it returns n < len(p).
|
||||||
|
//
|
||||||
|
// If WriteAt is writing to a destination with a seek offset,
|
||||||
|
// WriteAt should not affect nor be affected by the underlying
|
||||||
|
// seek offset.
|
||||||
|
//
|
||||||
|
// Clients of WriteAt can execute parallel WriteAt calls on the same
|
||||||
|
// destination if the ranges are not overlapping.
|
||||||
type WriterAt interface {
|
type WriterAt interface {
|
||||||
WriteAt(p []byte, off int64) (n int, err error)
|
WriteAt(p []byte, off int64) (n int, err error)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user