Skip to content

Commit

Permalink
Merge pull request unknwon#328 from htlhenry/patch-3
Browse files Browse the repository at this point in the history
go关键字之后的匿名函数需要加上()
  • Loading branch information
unknwon authored Feb 15, 2017
2 parents ce79b42 + 8d85f78 commit 78bf193
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eBook/14.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ ch := make(chan int)
go func(){
// doSomething
ch <- 1 // Send a signal; value does not matter
}
}()
doSomethingElseForAWhile()
<- ch // Wait for goroutine to finish; discard sent value.
```
Expand Down

0 comments on commit 78bf193

Please sign in to comment.