[go] encoding/gob: clarify docs about pointers to zero values not being sent

0 views
Skip to first unread message

Cherry Mui (Gerrit)

unread,
Dec 29, 2025, 3:45:13 PM (15 hours ago) Dec 29
to Oleg Zaytsev, Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Roland Shoemaker, Go LUCI, Rob Pike, Gopher Robot, golang-co...@googlegroups.com

Cherry Mui submitted the change

Change information

Commit message:
encoding/gob: clarify docs about pointers to zero values not being sent

The documentation on encoding/gob mentions that pointers are flattened,
and it also explicitly says that empty values are not sent.

A corollary of this, is that pointers to zero values are not sent, i.e.,
gob-encoding of *false becomes nil on the receiver side.

It is worth documenting this explicitly.
Change-Id: I1909203b8972e20791144bdda22e5f1b466aad97
GitHub-Last-Rev: 57764ec235ffe48484be98d3ed5269f0102ca4f8
GitHub-Pull-Request: golang/go#77009
Reviewed-by: Roland Shoemaker <rol...@golang.org>
Reviewed-by: Rob Pike <r...@golang.org>
Reviewed-by: Sean Liao <se...@liao.dev>
Reviewed-by: Cherry Mui <cher...@google.com>
Files:
  • M src/encoding/gob/doc.go
Change size: S
Delta: 1 file changed, 10 insertions(+), 10 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Sean Liao, +1 by Cherry Mui, +2 by Rob Pike, +1 by Roland Shoemaker
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I1909203b8972e20791144bdda22e5f1b466aad97
Gerrit-Change-Number: 732820
Gerrit-PatchSet: 3
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Rob Pike <r...@golang.org>
Gerrit-Reviewer: Roland Shoemaker <rol...@golang.org>
Gerrit-Reviewer: Sean Liao <se...@liao.dev>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-CC: Oleg Zaytsev <ma...@olegzaytsev.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages