Skip to content

Instantly share code, notes, and snippets.

@Acconut
Created March 3, 2017 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Acconut/6c6d015fee9c96ef5da320f8b53d5afd to your computer and use it in GitHub Desktop.
Save Acconut/6c6d015fee9c96ef5da320f8b53d5afd to your computer and use it in GitHub Desktop.

lockfile

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.

Build Status Unix Build status Windows

install

Install Go 1, either from source or with a prepackaged binary. For Windows suport, Go 1.4 or newer is required.

Then run

go get gopkg.in/Acconut/lockfile.v1

LICENSE

BSD

documentation

package documentation at godoc.org

contributing

Contributions are welcome. Please open an issue or send me a pull request for a dedicated branch. Make sure the git commit hooks show it works.

git commit hooks

enable commit hooks via

    cd .git ; rm -rf hooks; ln -s ../git-hooks hooks ; cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment