Command
go run -race main.goExplanation
Enable race condition detection to find data races in concurrent Go programs.
Examples
Run with race detection
go run -race main.goTest with race detection
go test -race ./...Build with race detection
go build -race