filelock

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Acquire

func Acquire(path string) (unlock func(), err error)

Acquire acquires an exclusive lock on path. Returns an unlock function. Caller must defer unlock(). The lock file is kept on disk after unlock.

func With

func With(path string, fn func() error) error

With acquires an exclusive lock on path, runs fn, and releases the lock. The lock file is created if needed and kept on disk (never deleted).

Types

This section is empty.

Jump to

Keyboard shortcuts

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