Document New() functions
This commit is contained in:
parent
dea20c74f5
commit
f9a59a552f
|
@ -21,11 +21,14 @@ type MemoryLocker struct {
|
||||||
locks map[string]bool
|
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 {
|
func NewMemoryLocker(_ tusd.DataStore) *MemoryLocker {
|
||||||
return New()
|
return New()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// New creates a new in-memory locker.
|
||||||
func New() *MemoryLocker {
|
func New() *MemoryLocker {
|
||||||
return &MemoryLocker{
|
return &MemoryLocker{
|
||||||
locks: make(map[string]bool),
|
locks: make(map[string]bool),
|
||||||
|
|
Loading…
Reference in New Issue