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

Add directory support #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tharvik
Copy link

@tharvik tharvik commented Oct 15, 2020

Followup of #39.

Comment from @theckman

I think to support this, at a minimum, we would need to move the OpenFile error handling code into the platform-specific flock.go files. To quote the proverbs: "Syscall must always be guarded with build tags."

So, I splitted setFh in the system specific files, that should do the trick. I'm unable to test for AIX but windows & linux pass the tests. I've keep the doubling of the main test suite, one with a file, another with a directory.

NB: on master, two examples in flock_example_test.go (namely ExampleFlock_TryLock & ExampleFlock_TryLockContext) are not being run, because of missing // Output: line.

@theckman
Copy link
Member

@tharvik working on seeing if I can get access to an AIX system to test this against.

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.

None yet

2 participants