Documentation ¶ Index ¶ type FileLocker type Locker func (l *Locker) Open() (*os.File, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type FileLocker ¶ type FileLocker interface { Open() (*os.File, error) } type Locker ¶ type Locker struct { Path string } func (*Locker) Open ¶ func (l *Locker) Open() (*os.File, error) Open will open and lock a file. It blocks until the lock is acquired. If the file does not yet exist, it creates the file, and any missing directories above it in the path. To release the lock, Close the file. Source Files ¶ View all Source files filelock.go Directories ¶ Show internal Expand all Path Synopsis filelock-demo Click to show internal directories. Click to hide internal directories.