]> Cypherpunks repositories - gostls13.git/commitdiff
doc: fix typo in The Laws of Reflection article
authorFrancisco Souza <franciscossouza@gmail.com>
Wed, 21 Mar 2012 23:42:04 +0000 (16:42 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 21 Mar 2012 23:42:04 +0000 (16:42 -0700)
R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5876047

doc/articles/laws_of_reflection.html
doc/progs/interface2.go

index ca729508bb26a6647bc3d4e812a50329334f12a6..a6175f73c1afe7186e913236c6d5f2a05928dfb3 100644 (file)
@@ -238,7 +238,7 @@ value (from here on we'll elide the boilerplate and focus just on
 the executable code):
 </p>
 
-{{code "/doc/progs/interface2.go" `/var x/` `/STOP/`}}
+{{code "/doc/progs/interface2.go" `/START f9/` `/STOP/`}}
 
 <p>
 prints
index 2deba32b464aabbca293376a36eb4799ecf9b6a8..a541d94e4839815564a68e7f5b7848f1809e8c20 100644 (file)
@@ -123,3 +123,10 @@ func f8() {
        fmt.Println("t is now", t)
        // STOP OMIT
 }
+
+func f9() {
+       // START f9 OMIT
+       var x float64 = 3.4
+       fmt.Println("value:", reflect.ValueOf(x))
+       // STOP OMIT
+}