Pattern: Lock passed by value
Issue: -
Lock can be passed by value or by pointer. Passing lock by value creates a copy of the lock and may cause unexpected behavior. This issue can be safely ignored if it's your intention.
Example of incorrect code:
func BadFunc(sync.Mutex) {} // BadFunc passes lock by value: sync.Mutex
Example of correct code:
func OkFunc(*sync.Mutex) {}