Handle locking via pid files.
Attention: This is a fork of Ingo Oeser's amazing work whose behavior differs a bit. While the original package allows a process to obtain the same lock twice, this fork forbids this behavior.
Install one of the two latest major releases of Go. Then run
go get github.com/tus/lockfile
Package documentation at pkg.go.dev.
Contributions are welcome. Please open an issue or send me a pull request for a dedicated branch.
MIT