]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1: minor html fixes
authorRobert Hencke <robert.hencke@gmail.com>
Thu, 26 Jan 2012 05:09:46 +0000 (21:09 -0800)
committerRob Pike <r@golang.org>
Thu, 26 Jan 2012 05:09:46 +0000 (21:09 -0800)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5572064

doc/go1.html
doc/go1.tmpl

index 412f3a555b545d645e440ee14aa1fb10a6070691..23ed3709fbe6a56b83316192c4462342b4a1f960 100644 (file)
@@ -74,8 +74,8 @@ to call <code>close</code> on a receive-only channel:
 
 <pre>
     var c chan int
-    var csend chan<- int = c
-    var crecv <-chan int = c
+    var csend chan&lt;- int = c
+    var crecv &lt;-chan int = c
     close(c)     // legal
     close(csend) // legal
     close(crecv) // illegal
@@ -328,8 +328,8 @@ This function implicitly returns a shadowed return value and will be rejected by
 
 <pre>
     func Bug() (i, j, k int) {
-        for i = 0; i < 5; i++ {
-            for j := 0; j < 5; j++ { // Redeclares j.
+        for i = 0; i &lt; 5; i++ {
+            for j := 0; j &lt; 5; j++ { // Redeclares j.
                 k += i*j
                 if k > 100 {
                     return // Rejected: j is shadowed here.
index 5fc67724a38f9202727b3bf3c7768b93168cf441..fd005b102df056871ff17342926205676ca68a87 100644 (file)
@@ -67,8 +67,8 @@ to call <code>close</code> on a receive-only channel:
 
 <pre>
     var c chan int
-    var csend chan<- int = c
-    var crecv <-chan int = c
+    var csend chan&lt;- int = c
+    var crecv &lt;-chan int = c
     close(c)     // legal
     close(csend) // legal
     close(crecv) // illegal
@@ -263,8 +263,8 @@ This function implicitly returns a shadowed return value and will be rejected by
 
 <pre>
     func Bug() (i, j, k int) {
-        for i = 0; i < 5; i++ {
-            for j := 0; j < 5; j++ { // Redeclares j.
+        for i = 0; i &lt; 5; i++ {
+            for j := 0; j &lt; 5; j++ { // Redeclares j.
                 k += i*j
                 if k > 100 {
                     return // Rejected: j is shadowed here.