When to Use ConcurrencyGoroutinesChannelsReading, Writing, and BufferingUsing for-range and ChannelsClosing a ChannelUnderstanding How Channels BehaveselectConcurrency Practices and PatternsKeep Your APIs Concurrency-FreeGoroutines, for Loops, and Varying VariablesAlways Clean Up Your GoroutinesUse the Context to Terminate GoroutinesKnow When to Use Buffered and Unbuffered ChannelsImplement BackpressureTurn Off a case in a selectTime Out CodeUse WaitGroupsRun Code Exactly OncePut Your Concurrent Tools TogetherWhen to Use Mutexes Instead of ChannelsAtomics—You Probably Don’t Need TheseWhere to Learn More About ConcurrencyExercisesWrapping Up