Update ugorji.go to use NumBytesWritten() call - #79
Closed
ugorji wants to merge 1 commit into
Closed
Conversation
Update ugorji.go to use NumBytesWritten() call No need to wrap a Writer since this is natively available.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Contributor
Author
|
I just cut v1.3.2. Pls rerun the benchmarks with v1.3.2 - I'm very curious (and interested) to see what the results are. |
2 tasks
leo-gan
reviewed
Aug 12, 2026
leo-gan
left a comment
Owner
There was a problem hiding this comment.
Thanks for this — NumBytesWritten() is the right API (especially with WriterBufferSize, where a wrapping countWriter can under-count until flush).
Blocker for merging this branch as-is: CI fails on the currently pinned github.com/ugorji/go/codec v1.3.1:
serializers/ugorji.go:94:18: s.strenc.NumBytesWritten undefined (type *codec.Encoder has no field or method NumBytesWritten)
As you noted in the thread, this needs codec v1.3.2. We cannot push to the fork from here, so the complete change (your wrapper removal + the v1.3.2 bump) is in #81, which will close this PR when merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No need to wrap a Writer since this is natively available.