]> Cypherpunks repositories - gostls13.git/commit
encoding/gob: clarify docs about pointers to zero values not being sent
authorOleg Zaytsev <mail@olegzaytsev.com>
Fri, 26 Dec 2025 20:11:01 +0000 (20:11 +0000)
committerCherry Mui <cherryyz@google.com>
Mon, 29 Dec 2025 20:45:08 +0000 (12:45 -0800)
commit0b06b68e21a3fbc75b3dd87c644da94828483a36
tree5b44033d187e3a7964680d1bd043ddc96c27de24
parent9cb3edbfe9eb68113453cdaa436db31d28577ab8
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-on: https://go-review.googlesource.com/c/go/+/732820
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/encoding/gob/doc.go