Skip to content
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

jsontext: Decoder.Reset and Encoder.Reset should allow nil #57

Open
dsnet opened this issue Oct 24, 2024 · 0 comments
Open

jsontext: Decoder.Reset and Encoder.Reset should allow nil #57

dsnet opened this issue Oct 24, 2024 · 0 comments

Comments

@dsnet
Copy link
Collaborator

dsnet commented Oct 24, 2024

I'm using jsontext.Encoder and jsontext.Decoder with a sync.Pool. Ideally, I should be able to put the encoder/decoder back into the pool without referencing the memory for the underlying io.Reader and io.Writer. Unfortunately, calling Reset(nil) panics. We should permit nil and just allow subsequent method calls to panic.

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

No branches or pull requests

1 participant