Skip to content

v0.1.0

Latest

Choose a tag to compare

@brandonkramer brandonkramer released this 31 May 17:00

Initial public release of the filelock module.

Features

  • Cross-platform advisory exclusive locks (Unix flock, Windows LockFileEx)
  • Acquire, With, and WithSidecar with context-aware blocking waits
  • Options: WritePID, Blocking, NonBlocking, FileMode
  • Injectable hooks for deterministic tests
  • Sidecar convention for locking beside JSON/state files (path.lock)

Tooling

  • Go 1.26.3 module with lefthook, golangci-lint, and GitHub Actions CI
  • Cross-platform tests on ubuntu, macOS, and Windows
  • 100% test coverage

Install

go get github.com/brandonkramer/filelock@v0.1.0

https://pkg.go.dev/github.com/brandonkramer/filelock@v0.1.0