chan是golang中非常重要的一个东西,用来做goroutine的通信,因为golang程序必然会有多个goroutine,如何同步这些goroutine就很重要了。
使用chan时有几个心得: (