cmd/vet: doesn't warn about function literals passing Locks by value #10927
Labels
Milestone
Comments
Good find. This is probably relatively straightforward, if you have any interest in tackling it. It probably consists of locating and extracting the relevant types and running them through lockPath. See https://github.com/golang/tools/blob/master/cmd/vet/copylock.go, https://github.com/golang/tools/blob/master/cmd/vet/testdata/copylock_func.go, and https://github.com/golang/tools/blob/master/cmd/vet/testdata/copylock_range.go. |
CL https://golang.org/cl/11051 mentions this issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
vet
currently warns when a function is declared to take a Lock , but not for function types or if the function is a function literal.The text was updated successfully, but these errors were encountered: