Go Things I Love: Channels and Goroutines
The example under "Communicating by sharing memory" isn't correct, despite the author claiming that "it works".  It's a very common example in concurrency 101 (updating a value).  The fact that the author claims that it's correct is pretty concerning to me.<p>Adding a print(len(ints)) at the bottom of the function:<p><pre><code>  $ go run test.go
   5
  $ go run test.go
   8  

</code></pre>
More on-topic, channels have their own tradeoffs.  I often reach for WaitGroups and mutexes instead of channels, because things can get complicated fast when you're routing data around with channels...more complicated than sharing memory.  I don't think it's good advice to broadly recommend one over the other--understand their tradeoffs and use the right tool for the job at hand.