Commit b790ad5a authored by Rob Pike's avatar Rob Pike

encoding/gob: document that zero elements of arrays and slices are sent

Fixes #13378

Change-Id: Ia78624ca1aa36ee906cef15416ea5554fa8229f2
Reviewed-on: https://go-review.googlesource.com/17201Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 1d3e7760
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment