You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that Buffer doesn't support read/write to a specific location when using bytes.Buffer.
This makes it inconvenient when I need to write a []byte in a specified location.
To make it easier to use, I'd like to help implement these basic functions.
type Seeker interface {
Seek(offset int64, whence int) (int64, error)
}
type WriterAt interface {
WriteAt(p []byte, off int64) (n int, err error)
}
type ReaderAt interface {
ReadAt(p []byte, off int64) (n int, err error)
}
The text was updated successfully, but these errors were encountered:
seankhliao
changed the title
proposal: bytes/buffer: implements io.Seeker, io.ReaderAt, io.WriterAt interfaces for offset read/write.
proposal: bytes: implement io.Seeker, io.ReaderAt, io.WriterAt for Buffer
Jan 13, 2024
Proposal Details
I found that
Buffer
doesn't support read/write to a specific location when usingbytes.Buffer
.This makes it inconvenient when I need to write a []byte in a specified location.
To make it easier to use, I'd like to help implement these basic functions.
The text was updated successfully, but these errors were encountered: