code: func OpenLockFile(name string, perm os.FileMode) (lock *LockFile, err error) {
  	var file *os.File
  	if file, err = os.OpenFile(name, os.O_RDWR|os.O_CREATE, perm); err == nil {
  		lock = &LockFile{file}
  	}
  	return
  }
docs: // OpenLockFile opens the named file with flags os.O_RDWR|os.O_CREATE and specified perm.
  // If successful, function returns LockFile for opened file.