Documentation ¶
Overview ¶
Package lockfile implements a simple automatic lockfile (PID) method for golang.
if lock, err := lockfile.Lock(filename); err != nil { panic(err) } else { defer lock.Unlock() }
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AlreadyLocked = errors.New("Locked by other process")
Functions ¶
func ProcessRunning ¶
ProcessRunning is a cross-platform check to work on both Windows and Unix systems as the os.FindProcess() function works differently.
Types ¶
type LockFile ¶
type LockFile struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.