Skip to content
This repository has been archived by the owner on Mar 15, 2019. It is now read-only.

Better way to detect bytecode files #39

Open
mna opened this issue Oct 5, 2013 · 2 comments
Open

Better way to detect bytecode files #39

mna opened this issue Oct 5, 2013 · 2 comments
Milestone

Comments

@mna
Copy link
Owner

mna commented Oct 5, 2013

Currently, bytecode.IsBytecode() only works for io.ReadSeeker types, but the Ctx.Load() can only guarantee an io.Reader. Other way to do this?

@BenLubar
Copy link

BenLubar commented Oct 5, 2013

You could do some combination of bytes.NewReader and io.MultiReader.

@mna
Copy link
Owner Author

mna commented Oct 5, 2013

I see what you mean. Read the signature bytes, create a reader off of those bytes, and combine those bytes with the rest of the reader using a multireader. Sounds like a good idea, thanks!

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

No branches or pull requests

2 participants