mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-23 12:37:07 +00:00
chore: fix many cosmetic linter warnings (#486)
* fix whitespace warnings Signed-off-by: James Hillyerd <james@hillyerd.com> * fix a number of typos Signed-off-by: James Hillyerd <james@hillyerd.com> * fix many cosmetic linter warnings Signed-off-by: James Hillyerd <james@hillyerd.com> --------- Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
// 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
|
||||
// Get returns a RWMutex based on the first 12 bits of the mailbox hash. Hash must be a hexadecimal
|
||||
// string of three or more characters.
|
||||
func (h *HashLock) Get(hash string) *sync.RWMutex {
|
||||
if len(hash) < 3 {
|
||||
|
||||
@@ -36,7 +36,7 @@ func TestHashLock(t *testing.T) {
|
||||
t.Run(ts, func(t *testing.T) {
|
||||
l := hl.Get(ts)
|
||||
if l == nil {
|
||||
t.Errorf("Expeced non-nil lock for hex string %q", ts)
|
||||
t.Errorf("Expected non-nil lock for hex string %q", ts)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ type mbox struct {
|
||||
|
||||
var _ storage.Store = &Store{}
|
||||
|
||||
// New returns an emtpy memory store.
|
||||
// New returns an empty memory store.
|
||||
func New(cfg config.Storage, extHost *extension.Host) (storage.Store, error) {
|
||||
s := &Store{
|
||||
boxes: make(map[string]*mbox),
|
||||
|
||||
Reference in New Issue
Block a user