Rename New to NewMemoryLocker

This commit is contained in:
Marius 2015-12-18 23:21:13 +01:00
parent 47492260e8
commit 97f2efb6e5
2 changed files with 2 additions and 2 deletions

View File

@ -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),
}

View File

@ -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)