code: func (dm *DRWMutex) Unlock() {
  
  	// create temp array on stack
  	locks := make([]string, dm.clnt.dNodeCount)
  
  	{
  		dm.m.Lock()
  		defer dm.m.Unlock()
  
  		// Check if minimally a single bool is set in the writeLocks array
  		lockFound := false
  		for _, uid := range dm.writeLocks {
  			if isLocked(uid) {
  				lockFound = true
  				break
  			}
  		}
  		if !lockFound {
  			panic("Trying to Unlock() while no Lock() is active")
  		}
  
  		// Copy write locks to stack array
  		copy(locks, dm.writeLocks[:])
  		// Clear write locks array
  		dm.writeLocks = make([]string, dm.clnt.dNodeCount)
  	}
  
  	isReadLock := false
  	unlock(dm.clnt, locks, dm.Name, isReadLock)
  }
docs: // Unlock unlocks the write lock.
  //
  // It is a run-time error if dm is not locked on entry to Unlock.