summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJean-Christophe Bohin <jc@bohin.net>2014-08-04 22:38:53 +0200
committerJean-Christophe Bohin <jc@bohin.net>2014-08-04 22:38:53 +0200
commit0078b03707eeccf50e5bb1d7230e88b4ce3d36be (patch)
treece4c9617e5b35d0e5106fb9e18f168c7db89c911
parenta0af5e9a7b0a924cd70e8d3b76f0f9c7eaf0d4d3 (diff)
Array initialization disambiguation - fixes #257
simply added proposed comment, which seems fine
-rw-r--r--go.html.markdown3
1 files changed, 2 insertions, 1 deletions
diff --git a/go.html.markdown b/go.html.markdown
index a1be08af..6c4d88bd 100644
--- a/go.html.markdown
+++ b/go.html.markdown
@@ -92,7 +92,8 @@ can include line breaks.` // Same string type.
// Arrays have size fixed at compile time.
var a4 [4]int // An array of 4 ints, initialized to all 0.
- a3 := [...]int{3, 1, 5} // An array of 3 ints, initialized as shown.
+ a3 := [...]int{3, 1, 5} // An array initialzed with a fixed size of three
+ //elements, with values 3,1, and 5
// Slices have dynamic size. Arrays and slices each have advantages
// but use cases for slices are much more common.