Re: [go-nuts] Have you seen any static analysis checker for sync.Mutex.Unlock() call?

2021-09-21 Thread Aram Hăvărneanu
Congratulations on solving the halting problem! PS: use defer otherwise you aren't panic-safe. -- Aram Hăvărneanu -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email

[go-nuts] Have you seen any static analysis checker for sync.Mutex.Unlock() call?

2021-09-21 Thread たふみ
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