]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go_mem.html: correct the channel example
authorShenghou Ma <minux@golang.org>
Sun, 15 Mar 2015 22:21:08 +0000 (18:21 -0400)
committerMinux Ma <minux@golang.org>
Mon, 16 Mar 2015 21:43:31 +0000 (21:43 +0000)
While we're here, also fix two HTML issues.

Fixes #9235.

Change-Id: I6e2f50931c0f387881271484a726ac2308518cf4
Reviewed-on: https://go-review.googlesource.com/7602
Reviewed-by: Rob Pike <r@golang.org>
doc/go_mem.html

index 5dd48ff7fbdea77ccaba39402f0c0c22fcdc1efe..143f3b2ff22e9d52047b05954f8e37aa1ff19b50 100644 (file)
@@ -322,11 +322,11 @@ var limit = make(chan int, 3)
 
 func main() {
        for _, w := range work {
-               go func() {
-                       limit <- 1
+               go func(w func()) {
+                       limit &lt;- 1
                        w()
-                       <-limit
-               }()
+                       &lt;-limit
+               }(w)
        }
        select{}
 }