Hi,
I'm seeking the static analysis checker (go vet tool) for missed call sync.Mutex.Unlock().
For example: source code is like
type T struct {
mu sync.Mutex
}
func (t *T) A(a bool) {
t.mu.Lock()
if (a) {
// here missing t.mu.Unlock()
return
}
t.mu.Unlock()
}
and by running go vet -vettool SOME_AWESOME_CHECKER, I want to find the absent of Unlock().
Currently, I'm developing this kind of tool (progress is about 60%), but if it exists, I don't want to reinvent the wheel.
So if you have ever seen any other related project, please let me know.
Thanks,
Tafumi