filelock

package
v0.9.21 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lock

func Lock(path string) (func() error, error)

Lock acquires an exclusive lock on path and returns a function that releases it.

func TryLock added in v0.9.0

func TryLock(path string) (func() error, error)

TryLock acquires an exclusive lock without waiting. It returns an error when another process already holds the lock.

Types

This section is empty.

Jump to

Keyboard shortcuts

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