-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
There's no way to return an error from MemoryBlockIterator #118
Comments
Guilty as charged. ;-) I think this was added to YARA for 4.1.0, after I had done the iterator code. Just like I have added another interface, |
thanks for responding! What you've got would work, but I think returning an error directly from |
Making First, Next return an error would break the API. Perhaps for version 5.0. |
doesn't adding a new method to the interface also break the API? |
No. For code using go-yara, implementing the extra interface is optional. Even though this is not the most (Golang-)idiomatic way to signal an error, I can't think of a better alternative. Would you like to contirbute a test case? |
In C, a
YR_MEMORY_BLOCK_ITERATOR
can setlast_error
from its iteration functions in order to return an error, but this doesn't seem to be accessible from go.The text was updated successfully, but these errors were encountered: