-
Rob Pike authored
The documentation was inconsistent. It said zero values were not sent, but that zero-valued elements of arrays and arrays were sent. But which rule applies if the array is all zero elements, and is therefore itself a zero value? The answer is: the array is transmitted. In principle the other choice could be made, but there would be considerable expense and complexity required to implement this behavior now, not to mention worries about changes of behavior. Therefore we just document the situation: Arrays, slices, and maps are always encoded. It would perhaps be nice to have sorted this out earlier, but it was a missed opportunity. Fixes #13378 Change-Id: I8fae345edfa707fcfa7a3e0160d87ff1ac5cc5a2 Reviewed-on: https://go-review.googlesource.com/17394Reviewed-by: Russ Cox <rsc@golang.org>
148b13c3