Channels In Golang
This is the final post in my “Do You Concur?” series. If you’ve not checked the other two out it is highly recommended you do that before reading this one. With that out of the way let’s get started! What Are Channels? A channel in Go can be best understood by comparing it with a box. It is a box where goroutines can put and take out the data. So essentially channels help your goroutines to share data. One goroutine can send a value into the channel and another goroutine can receive those values. A very simple code snippet demonstrating this is: ...