]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/gob: document that zero elements of arrays and slices are sent
authorRob Pike <r@golang.org>
Tue, 24 Nov 2015 18:32:37 +0000 (10:32 -0800)
committerRob Pike <r@golang.org>
Tue, 24 Nov 2015 19:06:11 +0000 (19:06 +0000)
Fixes #13378

Change-Id: Ia78624ca1aa36ee906cef15416ea5554fa8229f2
Reviewed-on: https://go-review.googlesource.com/17201
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/encoding/gob/doc.go

index 481c7572d90a8da5f2710722cb810e072b70a139..18a91bd7add759f9176cfcc90e6637cb12d5a3dc 100644 (file)
@@ -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