code: func NewKeyLock(lockDir string, key string) (*KeyLock, error) {
  	err := os.MkdirAll(lockDir, defaultDirPerm)
  	if err != nil {
  		return nil, err
  	}
  	keyLockFile := filepath.Join(lockDir, key)
  	// create the file if it doesn't exists
  	f, err := os.OpenFile(keyLockFile, os.O_RDONLY|os.O_CREATE, defaultFilePerm)
  	if err != nil {
  		return nil, errwrap.Wrap(errors.New("error creating key lock file"), err)
  	}
  	f.Close()
  	keyLock, err := NewLock(keyLockFile, RegFile)
  	if err != nil {
  		return nil, errwrap.Wrap(errors.New("error opening key lock file"), err)
  	}
  	return &KeyLock{lockDir: lockDir, key: key, keyLock: keyLock}, nil
  }
docs: // NewKeyLock returns a KeyLock for the specified key without acquisition.
  // lockdir is the directory where the lock file will be created. If lockdir
  // doesn't exists it will be created.
  // key value must be a valid file name (as the lock file is named after the key
  // value).