go func() {
for i := 0; i < 100; i++ {
fmt.Println("协程1:" + strconv.Itoa(i))
}
}()
go func() {
for i := 100; i < 200; i++ {
fmt.Println("协程2:" + strconv.Itoa(i))
}
}()
time.Sleep(time.Second)time.Second)
![xiecheng.png](https://static.studygolang.com/181231/072d1f0827d3713694ebc6c233634cba.png)
有疑问加站长微信联系(非本文作者)