From: griesemer Date: Thu, 24 Aug 2017 13:20:18 +0000 (+0200) Subject: spec: clarify zero value for complex types X-Git-Tag: go1.10beta1~1373 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a9f832a6aedbce206d44d099c67448e8aa747690;p=gostls13.git spec: clarify zero value for complex types The enumeration of numeric types missed the complex types. Clarify by removing the explicit enumeration and referring to numeric types instead. Fixes #21579. Change-Id: If36c2421f8501eeec82a07f442ac2e16a35927ba Reviewed-on: https://go-review.googlesource.com/58491 Reviewed-by: Matthew Dempsky Reviewed-by: Ian Lance Taylor Reviewed-by: Rob Pike --- diff --git a/doc/go_spec.html b/doc/go_spec.html index 6c0dc8bbd5..a2ad56b4f9 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -6158,7 +6158,7 @@ of make, and no explicit initialization is provided, the variable or value is given a default value. Each element of such a variable or value is set to the zero value for its type: false for booleans, -0 for integers, 0.0 for floats, "" +0 for numeric types, "" for strings, and nil for pointers, functions, interfaces, slices, channels, and maps. This initialization is done recursively, so for instance each element of an array of structs will have its fields zeroed if no value is specified.