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

encoding/gob: Documentation bug in gob #23358

Closed
jaekwon opened this issue Jan 7, 2018 · 2 comments
Closed

encoding/gob: Documentation bug in gob #23358

jaekwon opened this issue Jan 7, 2018 · 2 comments

Comments

@jaekwon
Copy link

@jaekwon jaekwon commented Jan 7, 2018

https://golang.org/pkg/encoding/gob/#Encoder.Encode says,

Passing a nil pointer to Encoder will panic, as they cannot be transmitted by gob.

But it does not. See: https://play.golang.org/p/9zffEMP_DQU

Same with https://golang.org/pkg/encoding/gob/#Encoder.EncodeValue.

We're working on yet another encoding library (this one handles Golang interfaces well) for Tendermint and found this discrepancy.

@odeke-em

@jaekwon
Copy link
Author

@jaekwon jaekwon commented Jan 7, 2018

Nevermind, bad example, no bug.

@jaekwon jaekwon closed this Jan 7, 2018
@mikioh mikioh changed the title Documentation bug in gob encoding/gob: Documentation bug in gob Jan 7, 2018
@odeke-em
Copy link
Member

@odeke-em odeke-em commented Jan 7, 2018

Ahh right, sorry about that @jaekwon -- the docs are right as you noted later on before closing.

@golang golang locked and limited conversation to collaborators Jan 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.