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

proposal: encoding/gob: remove panic on nil pointer values in EncodeValue #65268

Closed
callthingsoff opened this issue Jan 24, 2024 · 1 comment
Closed
Labels
Milestone

Comments

@callthingsoff
Copy link
Contributor

callthingsoff commented Jan 24, 2024

Proposal Details

Remove the intentional panic that was previously encountered when EncodeValue was passed nil values.

Previously, we panicked so as to maintain logical cohesion, like one would encounter when dereferencing a nil pointer in Go code. However, that makes for a not-great developer experience, thus this change instead returns an error that users can inspect.

This is based on #31664, and requested to be revised into a proposal in CL 554415.

@gopherbot gopherbot added this to the Proposal milestone Jan 24, 2024
@ianlancetaylor
Copy link
Contributor

CC @robpike

@callthingsoff callthingsoff closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants