code: func CleanKeyLocks(lockDir string) error {
  	f, err := os.Open(lockDir)
  	if err != nil {
  		return errwrap.Wrap(errors.New("error opening lockDir"), err)
  	}
  	defer f.Close()
  	files, err := f.Readdir(0)
  	if err != nil {
  		return errwrap.Wrap(errors.New("error getting lock files list"), err)
  	}
  	for _, f := range files {
  		filename := filepath.Join(lockDir, f.Name())
  		keyLock, err := TryExclusiveKeyLock(lockDir, f.Name())
  		if err == ErrLocked {
  			continue
  		}
  		if err != nil {
  			return err
  		}
  
  		err = os.Remove(filename)
  		if err != nil {
  			keyLock.Close()
  			return errwrap.Wrap(errors.New("error removing lock file"), err)
  		}
  		keyLock.Close()
  	}
  	return nil
  }
docs: // CleanKeyLocks remove lock files from the lockDir.
  // For every key it tries to take an Exclusive lock on it and skip it if it
  // fails with ErrLocked