请教大家一个问题
怎么不让222打印出来![1.png](https://static.studygolang.com/190925/7e908c2e6b9ead87e3f26d53b001fad1.png)![2.png](https://static.studygolang.com/190925/ce19cf8aae2a70aaf4c465d7459384de.png)
更多评论
```go
package main
import (
"log"
"time"
)
func main() {
cb := make(chan bool, 1)
go func() {
timer2 := time.NewTimer(time.Second * 5)
select {
case <-timer2.C:
log.Println(222)
cb <- true
case <-cb:
return
}
}()
log.Println()
timer := time.NewTimer(time.Second * 2)
select {
case <-timer.C:
log.Println("time out")
cb <- false
case tmp := <-cb:
log.Println(tmp)
}
time.Sleep(time.Second * 10)
log.Println(123)
}
```
#1
timer2 再定义一个的话没法执行逻辑代码吧![3.png](https://static.studygolang.com/190925/00dc87f4e4fe9d54ae393163943b5fa5.png)
#2