Skip to content

Update ugorji.go to use NumBytesWritten() call - #79

Closed
ugorji wants to merge 1 commit into
leo-gan:masterfrom
ugorji:patch-2
Closed

Update ugorji.go to use NumBytesWritten() call#79
ugorji wants to merge 1 commit into
leo-gan:masterfrom
ugorji:patch-2

Conversation

@ugorji

@ugorji ugorji commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

No need to wrap a Writer since this is natively available.

Update ugorji.go to use NumBytesWritten() call

No need to wrap a Writer since this is natively available.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@ugorji

ugorji commented Aug 4, 2026

Copy link
Copy Markdown
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.

@leo-gan leo-gan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@leo-gan leo-gan closed this in 807133f Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants