Document New() functions

This commit is contained in:
Marius 2016-03-04 22:25:15 +01:00
parent dea20c74f5
commit f9a59a552f
1 changed files with 4 additions and 1 deletions

View File

@ -21,11 +21,14 @@ type MemoryLocker struct {
locks map[string]bool
}
// New creates a new lock memory.
// NewMemoryLocker creates a new in-memory locker. The DataStore parameter
// is only presented for back-wards compatibility and is ignored. Please
// use the New() function instead.
func NewMemoryLocker(_ tusd.DataStore) *MemoryLocker {
return New()
}
// New creates a new in-memory locker.
func New() *MemoryLocker {
return &MemoryLocker{
locks: make(map[string]bool),