-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: x/exp/mmap: expose a File-like type #39683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is there a reason you can't (or shouldn't) wrap it in an |
no, I just didn't think about but for "application B", I would need r/w capabilities (to interact with a Cyclone V FPGA board) |
You could easily fork SectionReader and create SectionWriter. Writing to a fixed area is not particularly common though, so it might not be worth putting in io itself. It does seem like the general adapters are better than more functionality in package mmap itself. |
Based on the discussion above, this seems like a likely decline. |
No change in consensus, so declined. |
right now, with the current
mmap.ReaderAt
type, one can easily (and from multiple goroutines) access mmap'ed data.that's great.
but my application A also needs an
io.Reader
.I've resorted to forking the
x/exp/mmap
package under go-mmap/mmap, that exposes aReader
type that implementsio.Reader
,io.Seeker
,io.ReaderAt
andio.ByteReader
.now, in yet another application (B), to interface with a FPGA board, I'd also need write access.
it comes to reason to thus expose a
File
-like type, implementing alsoio.Writer
,io.WriterAt
andio.ByteWriter
.The text was updated successfully, but these errors were encountered: