Rename New to NewMemoryLocker
This commit is contained in:
parent
47492260e8
commit
97f2efb6e5
|
@ -12,7 +12,7 @@ type MemoryLocker struct {
|
|||
}
|
||||
|
||||
// New creates a new lock memory persistor.
|
||||
func New() *MemoryLocker {
|
||||
func NewMemoryLocker() *MemoryLocker {
|
||||
return &MemoryLocker{
|
||||
locks: make(map[string]bool),
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
func TestMemoryLocker(t *testing.T) {
|
||||
var locker Locker
|
||||
locker = New()
|
||||
locker = NewMemoryLocker()
|
||||
|
||||
if err := locker.LockUpload("one"); err != nil {
|
||||
t.Errorf("unexpected error when locking file: %s", err)
|
||||
|
|
Loading…
Reference in New Issue