4 ms·
At least some of these would be caught by running your tests with race detection on? I haven't read the whole article yet but as soon as I read the loop variabl
by aaronbwebber 4y ago
At least some of these would be caught by running your tests with race detection on? I haven't read the whole article yet but as soon as I read the loop variable one I was pretty sure I have written code with that exact bug and had it caught by tests...
https://go.dev/doc/articles/race_detector https://go.dev/doc/articles/race_detector
Edit: at the _end_ of the post, they mention that this is the second of two blog posts talking about this, and in the first post they explain that they caught these by deploying the default race detector and why they haven't been running it as part of CI (tl;dr it's slower and more resource-expensive and they had a large backlog).
https://eng.uber.com/dynamic-data-race-detection-in-go-code/ https://eng.uber.com/dynamic-data-race-detection-in-go-code/