aboutsummaryrefslogtreecommitdiff
path: root/doc/go_spec.html
diff options
context:
space:
mode:
authorgriesemer <gri@golang.org>2017-08-24 15:20:18 +0200
committerRobert Griesemer <gri@golang.org>2017-08-25 08:12:51 +0000
commita9f832a6aedbce206d44d099c67448e8aa747690 (patch)
tree5cb9292a008e12e4e95e35ec093f4a5acbd5e567 /doc/go_spec.html
parentb976859b4757eafac39988c9ba72704ff472786f (diff)
downloadgo-a9f832a6aedbce206d44d099c67448e8aa747690.tar.gz
go-a9f832a6aedbce206d44d099c67448e8aa747690.zip
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 <mdempsky@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'doc/go_spec.html')
-rw-r--r--doc/go_spec.html2
1 files changed, 1 insertions, 1 deletions
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 <code>make</code>,
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 <i>zero value</i> for its type: <code>false</code> for booleans,
-<code>0</code> for integers, <code>0.0</code> for floats, <code>""</code>
+<code>0</code> for numeric types, <code>""</code>
for strings, and <code>nil</code> 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.