A common mistake involves closures capturing loop variables:
for i := 0; i < 3; i++ {
go func() {
fmt.Println(i) // Might print 3, 3, 3
}()
}
The closure captures i by reference. By the time goroutines run, the loop may have finished. Fix this by passing i as an argument or creating a local copy inside the loop.