]> Cypherpunks repositories - gostls13.git/commitdiff
spec: move decl in example closer to use
authorRobert Griesemer <gri@golang.org>
Thu, 11 Jul 2013 21:41:46 +0000 (14:41 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 11 Jul 2013 21:41:46 +0000 (14:41 -0700)
Fixes #5862.

R=r
CC=golang-dev
https://golang.org/cl/11168043

doc/go_spec.html

index 4f2995ab20ee4d69a97ec56759c0864c7a185f8f..14903f0b3c2796a0c4faf714a68759a884016083 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of July 9, 2013",
+       "Subtitle": "Version of July 11, 2013",
        "Path": "/ref/spec"
 }-->
 
@@ -4664,7 +4664,6 @@ for i, _ := range testdata.a {
 }
 
 var a [10]string
-m := map[string]int{"mon":0, "tue":1, "wed":2, "thu":3, "fri":4, "sat":5, "sun":6}
 for i, s := range a {
        // type of i is int
        // type of s is string
@@ -4674,6 +4673,7 @@ for i, s := range a {
 
 var key string
 var val interface {}  // value type of m is assignable to val
+m := map[string]int{"mon":0, "tue":1, "wed":2, "thu":3, "fri":4, "sat":5, "sun":6}
 for key, val = range m {
        h(key, val)
 }