mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:06:41 +08:00
fix format.
This commit is contained in:
@@ -61,9 +61,11 @@ if value, ok := varI.(T); ok {
|
|||||||
for input := range ch {
|
for input := range ch {
|
||||||
Process(input)
|
Process(input)
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
或者:
|
或者:
|
||||||
|
|
||||||
|
```go
|
||||||
for {
|
for {
|
||||||
if input, open := <-ch; !open {
|
if input, open := <-ch; !open {
|
||||||
break // 通道是关闭的
|
break // 通道是关闭的
|
||||||
|
Reference in New Issue
Block a user