singleinstance

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAndShowExistingWindow

func FindAndShowExistingWindow(windowTitle string) bool

FindAndShowExistingWindow attempts to show the existing application window On Unix/macOS, this is not supported due to lack of cross-platform window management APIs Returns false to indicate the window could not be activated

Types

type Mutex

type Mutex struct {
	// contains filtered or unexported fields
}

Mutex represents a Unix file lock for single instance checking

func CreateMutex

func CreateMutex(name string) (*Mutex, error)

CreateMutex creates a file lock for single instance checking Uses flock (file locking) which is the standard Unix way to implement single instance

func (*Mutex) Release

func (m *Mutex) Release() error

Release releases the file lock and removes the lock file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL