aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/gob
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2015-11-24 10:32:37 -0800
committerRob Pike <r@golang.org>2015-11-24 19:06:11 +0000
commitb790ad5ac0c9f2cc20ded07162e539702b1b029f (patch)
tree72cb8594d62e3b291a99cf92c4a361db661b2af6 /src/encoding/gob
parent1d3e77607dcc15194f3e772dc5b58980798a6ea5 (diff)
downloadgo-b790ad5ac0c9f2cc20ded07162e539702b1b029f.tar.gz
go-b790ad5ac0c9f2cc20ded07162e539702b1b029f.zip
encoding/gob: document that zero elements of arrays and slices are sent
Fixes #13378 Change-Id: Ia78624ca1aa36ee906cef15416ea5554fa8229f2 Reviewed-on: https://go-review.googlesource.com/17201 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding/gob')
-rw-r--r--src/encoding/gob/doc.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/encoding/gob/doc.go b/src/encoding/gob/doc.go
index 481c7572d9..18a91bd7ad 100644
--- a/src/encoding/gob/doc.go
+++ b/src/encoding/gob/doc.go
@@ -140,7 +140,8 @@ Strings and slices of bytes are sent as an unsigned count followed by that many
uninterpreted bytes of the value.
All other slices and arrays are sent as an unsigned count followed by that many
-elements using the standard gob encoding for their type, recursively.
+elements using the standard gob encoding for their type, recursively. In slices
+and arrays, elements with the zero value are transmitted.
Maps are sent as an unsigned count followed by that many key, element
pairs. Empty but non-nil maps are sent, so if the receiver has not allocated