3 type MockMutex struct {
4 AllowLock chan struct{}
5 AllowUnlock chan struct{}
8 func NewMockMutex() *MockMutex {
10 AllowLock: make(chan struct{}),
11 AllowUnlock: make(chan struct{}),
15 // Lock waits for someone to send to AllowLock.
16 func (m *MockMutex) Lock() {
20 // Unlock waits for someone to send to AllowUnlock.
21 func (m *MockMutex) Unlock() {