feat: add directory support
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.
@tharvik working on seeing if I can get access to an AIX system to test this against.