Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libs/fslock: a simple utility to lock directories #71

Merged
merged 5 commits into from
Sep 27, 2021
Merged

Conversation

Wondertan
Copy link
Member

@Wondertan Wondertan commented Sep 20, 2021

Context

Over the weekend in my spare time, I was playing around syscalls and wanted to implement something. The idea fell to do something useful to our current tasks and so I decided to make a locking library, as we need to lock our Repo from simultaneous usage. I am aware there are existing libraries solving that, but this one is especially minimal.

Filling

  • Implemented and tested on Linux/MacOS
  • Windows support? Maybe...

Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. It makes me a bit anxious about how few test cases are there. Speaking of which can we add a badge with test-coverage to this repo like in the others (cc @Bidon15).

libs/fslock/lock_unix.go Show resolved Hide resolved
libs/fslock/lock_unix.go Outdated Show resolved Hide resolved
@Wondertan
Copy link
Member Author

Would like to merge it today pls

Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nits but otherwise i'm okay with it. Will see how it will be used later when CLI created.

libs/fslock/locker.go Outdated Show resolved Hide resolved
libs/fslock/locker.go Outdated Show resolved Hide resolved
libs/fslock/locker.go Show resolved Hide resolved
Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Wondertan Wondertan merged commit 72b02eb into main Sep 27, 2021
@Wondertan Wondertan deleted the hlib/fslock branch September 27, 2021 10:30
@Wondertan Wondertan restored the hlib/fslock branch January 7, 2022 14:40
@Wondertan Wondertan deleted the hlib/fslock branch January 7, 2022 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants