You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does 'go version' print?
go version go1.3 linux/amd64
What steps reproduce the problem?
Any program where a slice of structs (not pointes to structs) containing locking
primitives by value
is iterated over with range-for, and the locks are used in the loop body.
1. http://play.golang.org/p/FMsMT0dnhf
What happened?
Go vet didn't warn that the locking/unlocking would be rendered useless by this action.
Even though I expected it to because it also warns on returning such structs by value
from functions and the like.
What should have happened instead?
Go vet should've warned me that this was dangerous.
The text was updated successfully, but these errors were encountered:
by nicolashillegeer:
The text was updated successfully, but these errors were encountered: