Avoiding Data Races in Go: Best Practices for Concurrency

Benjamin Cane
8 min readSep 5, 2022
Photo by Serge van Neck on Unsplash

Concurrency is such a foundational capability of the Go language that it is effortless to write code that leverages multiple goroutines, sometimes without even knowing.

As an example, if you’ve ever used the net/http package to create a web service, you’ve used goroutines.

Benjamin Cane

Building payments systems at American Express. Author (https://amzn.to/3kuCFpz). Open-source contributor (https://github.com/madflojo).

Recommended from Medium

Lists

See more recommendations