New returns a new IdLock
()
| 9 | |
| 10 | // New returns a new IdLock |
| 11 | func NewIdlock() *IdLock { |
| 12 | return &IdLock{ |
| 13 | locks: make(map[string]sync.Locker), |
| 14 | } |
| 15 | |
| 16 | } |
| 17 | |
| 18 | // Get returns a lock that is bound to a specific id. |
| 19 | func (i *IdLock) Get(id string) sync.Locker { |
no outgoing calls
no test coverage detected