Help us shape the future of Go! Take the 2026 Go Developer Survey

filelock

package
v0.13.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package filelock provides nonblocking, process-owned locks on real files.

Index

Constants

This section is empty.

Variables

View Source
var ErrBusy = errors.New("file is locked by another owner")

Functions

func Open

func Open(path string) (*os.File, error)

Open refuses a symlink at the final path. Its parent must be host-owned.

func TryLock

func TryLock(file *os.File, exclusive bool) error

func Unlock

func Unlock(file *os.File) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL