Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAlreadyRunning -- the instance is already running ErrAlreadyRunning = errors.New("the program is already running") // Lockfile -- the lock file to check Lockfile string )
Functions ¶
This section is empty.
Types ¶
type Single ¶
type Single struct {
// contains filtered or unexported fields
}
Single represents the name and the open file descriptor
func (*Single) CheckLock ¶
CheckLock tries to obtain an exclude lock on a lockfile and returns an error if one occurs
func (*Single) Filename ¶
Filename returns an absolute filename, appropriate for the operating system
func (*Single) Lock ¶
func (s *Single) Lock()
Lock tries to obtain an exclude lock on a lockfile and exits the program if an error occurs
Click to show internal directories.
Click to hide internal directories.