-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflockstub.go
32 lines (27 loc) · 851 Bytes
/
flockstub.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// +build !darwin,!freebsd,!linux,!netbsd,!openbsd
package fortuna
import (
"errors"
"os"
)
var (
// ErrAlreadyLocked is an error code indicating that a file could
// not be locked because a lock was already present.
errAlreadyLocked = errors.New("resource temporarily unavailable")
)
// Flock is a dummy function which always returns nil on this system.
//
// On systems which support file locking, Flock() tries to acquire an
// exclusive lock to the given file. If the file is already locked,
// ErrAlreadyLocked is returned.
func flock(file *os.File) error {
return nil
}
// Funlock is a dummy function which always returns nil on this
// system.
//
// On systems which support file locking, Funlock() can be used to
// release a file lock which was previously acquired using Flock().
func funlock(file *os.File) error {
return nil
}