Skip to content
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

Implement io.ReaderAt for File #130

Open
microo8 opened this issue Jan 23, 2019 · 0 comments
Open

Implement io.ReaderAt for File #130

microo8 opened this issue Jan 23, 2019 · 0 comments

Comments

@microo8
Copy link

microo8 commented Jan 23, 2019

If I add a zip file, and want to unzip it, the zip.NewReader takes a io.ReaderAt.

There is a workaround: I ask for the bytes of the file from rice and then create bytes.NewReader

fileBytes, err := box.Bytes("filename")
if err != nil {
  panic(err)
}
zr, err := zip.NewReader(bytes.NewReader(fileBytes), int64(len(fileBytes)))
...

But it would be great if I can use just rice.File for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants