When to Use ConcurrencyGoroutinesChannelsReading, Writing, and Bufferingfor-range and ChannelsClosing a ChannelHow Channels BehaveselectConcurrency Practices and PatternsKeep Your APIs Concurrency-FreeGoroutines, for Loops, and Varying VariablesAlways Clean Up Your GoroutinesThe Done Channel PatternUsing a Cancel Function to Terminate a GoroutineWhen to Use Buffered and Unbuffered ChannelsBackpressureTurning Off a case in a selectHow to Time Out CodeUsing WaitGroupsRunning Code Exactly OncePutting Our Concurrent Tools TogetherWhen to Use Mutexes Instead of ChannelsAtomics—You Probably Don’t Need TheseWhere to Learn More About ConcurrencyWrapping Up