cmd/vet: detect misuse of atomic.Add*
Re-assigning the return value of an atomic operation to the same variable being operated is a common mistake: x = atomic.AddUint64(&x, 1) Add this check to go vet. Fixes #4065. R=dvyukov, golang-dev, remyoudompheng, rsc CC=golang-dev https://golang.org/cl/7097048
Showing
src/cmd/vet/atomic.go
0 → 100644
Please register or sign in to comment