fix: coding style and file format for chapter 11, 12, 13, 14 and 15.

This commit is contained in:
Bo-Yi Wu
2017-02-11 12:32:16 +08:00
parent c5413075c1
commit 4abbfabb52
63 changed files with 2662 additions and 2622 deletions

View File

@@ -1,22 +1,22 @@
package main
import (
"fmt"
)
func tel(ch chan int) {
for i := 0; i < 15; i++ {
ch <- i
}
}
func main() {
var ok = true
ch := make(chan int)
go tel(ch)
for ok {
i := <-ch
fmt.Printf("ok is %t and the counter is at %d\n", ok, i)
}
}
package main
import (
"fmt"
)
func tel(ch chan int) {
for i := 0; i < 15; i++ {
ch <- i
}
}
func main() {
var ok = true
ch := make(chan int)
go tel(ch)
for ok {
i := <-ch
fmt.Printf("ok is %t and the counter is at %d\n", ok, i)
}
}