1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00

Resolve linter errors exposed by fixed Makefile

- TravisCI didn't like "POSIX" ::= syntax
This commit is contained in:
James Hillyerd
2018-03-09 22:01:43 -08:00
parent f8c30a678a
commit 94167fa313
10 changed files with 19 additions and 8 deletions

View File

@@ -5,8 +5,12 @@ import (
"sync"
)
// HashLock holds a fixed length array of mutexes. This approach allows concurrent mailbox
// access in most cases without requiring an infinite number of mutexes.
type HashLock [4096]sync.RWMutex
// Get returns a RWMutex based on the first 12 bits of the mailbox hash. Hash must be a hexidecimal
// string of three or more characters.
func (h *HashLock) Get(hash string) *sync.RWMutex {
if len(hash) < 3 {
return nil