func (o *MemMapLock) GetLock(filename string) (filelock.TryLockerSafe, error) {
	lock, exists := o.Locks[filename]

	if exists {
		return lock, o.Err
	}

	lock = &MemLock{
		path:   filename,
		locked: false,
		err:    o.LockErr,
	}

	o.Locks[filename] = lock

	return lock, o.Err
}
// GetLock - create a new lock.
create a new lock.
// GetLock - create a new lock .
func (o *MemMapLock) GetLock(filename string) (filelock.TryLockerSafe, error) {
	lock, exists := o.Locks[filename]
	if exists {
		return lock, o.Err
	}
	lock = &MemLock{
		path:   filename,
		locked: false,
		err:    o.LockErr,
	}
	o.Locks[filename] = lock
	return lock, o.Err
}
func ( o * MemMapLock ) GetLock ( filename string ) ( filelock . TryLockerSafe , error ) { lock , exists := o . Locks [ filename ] if exists { return lock , o . Err } lock = & MemLock { path : filename , locked : false , err : o . LockErr , } o . Locks [ filename ] = lock return lock , o . Err }
create a new lock.
create a new lock .