Mickey Killianey
unread,Dec 6, 2010, 4:00:00 AM12/6/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
I'm looking for a way to get an array of bytes to satisfy the
io.ReaderAt interface, and I can't find a utility wrapper in bytes,
io, or io/ioutil...am I just looking in the wrong spot? Is there a
canonical way to do this?
I know, I know, it's not that many lines of code, but with len(p)
being an int and off being an int64 in the io.ReaderAt's signature...
ReadAt(p []byte, off int64) (n int, err os.Error)
...I'd rather not hack up my own and worry about whether or not I've
checked all the edge cases correctly.
FWIW, I'm doing this because I have bytes that *aren't* coming from a
file that I want to pass to zip.NewReader().
Mick