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
Turn this package into a wrapper for protobuf/encoding/protodelim #22
Conversation
This PR is now ready for review (Go Protobuf v1.31.0 contains the fix we needed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to address your comment, and also bumped the commit date to today :)
Looks good. I think we can merge it pretty readily. |
Great stuff! Ready when you are :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comments below are rather simple:
Since Go Protobuf v1.30.0, the protodelim package is available upstream. The only notable API difference is that protodelim does not return the number of bytes read, which is why I added the countingReader type to pbutil/decode.go.
Since Go Protobuf v1.30.0, the protodelim package is available upstream.
The only notable API difference is that protodelim does not return the number of bytes read, which is why I added the countingReader type to pbutil/decode.go.
fixes #21
I’m creating this as a draft pull request because https://go-review.git.corp.google.com/c/protobuf/+/505555 needs to get merged and released before the tests pass (
TestReadDelimitedPrematureHeader
currently panics). Feel free to review already if you want — I don’t foresee any more changes other than a go.mod update.