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