Closed AMCR closed 11 months ago
As it is, it's a bit hard to review your changes. Can you cleanup your tree, and also can you please separate the main change from the following?
- using Go error wrapping instead of github.com/pkg/errors
- improving stringToXMLChar to also return the function to free the allocated memory;
- adding function stringToChar to convert Go String to C char* and the function to free the allocated memory;
- updating some tests;
(Also, obviously the tests need to be passing)
@AMCR Please check my previous comment
@lestrrat Thanks for your comments. I will address then ASAP
Hey @lestrrat! I have cleaned up the tree as you asked. I will propose the other changes in a different PR.
I will propose the other changes in a different PR.
Thanks! Give me a little time to tweak your change. I got the intention behind the change, but there are few things that I want to do on my side that has to do with style and other intended future changes.
Thanks for your suggestions. They make a lot of sense. Let me address the issues mentioned above.
I've decided to use the following implementation instead:
type Callback interface {
Open(string) (io.ReadClose, error)
CallbackMatcher
}
This way, if called concurrently, the Open operation will return a different io.Reader.
@AMCR oh, was I to review the code already? Sorry, I knew you updated this PR, but I didn't think that it would be ready so quickly. Sorry, but I'm out of tuits for the day. I will check back sometime tomorrow my time.
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.
This PR was closed because it has been stalled for 14 days with no activity. This does not mean your PR is rejected, but rather it is done to hide it from the view of the maintainers for the time being. Feel free to reopen if you have new comments or chnages that you would like to include.
This PR contains the following features:
Additionally, the code includes the following refactoring:
github.com/pkg/errors
stringToXMLChar
to also return the function to free the allocated memory;stringToChar
to convert GoString
to Cchar*
and the function to free the allocated memory;