Go implementation of filesystem-level locking.
gofslock
offers several features:
- Exclusive and shared locking senamtics.
- Consistent intra- and inter-processing locking behavior across major operating systems (notably Linux, Mac, and Windows).
- Works on all Go versions.
- Only depends on Go standard library.
- Locking behavior and interaction is heavily tested.
Request features and report bugs using the GitHub Issue Tracker.
Contributions to this project are welcome, though please file an issue before starting work on anything major.
To get started contributing to this project, clone the repository:
git clone https://github.com/danjacques/gofslock
This repository uses pre-commit-go to validate itself. Please install this prior to working on the project:
- Make sure your
user.email
anduser.name
are configured ingit config
. - Install test-only packages:
go get -u -t github.com/danjacques/gofslock/...
- Install the pcg git hook:
go get -u github.com/maruel/pre-commit-go/cmd/... && pcg