Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLoginItem ¶
func IsLoginItem() bool
func Notify ¶
Notify shows a best-effort native error message to the user. It exists for failures the user must see even though no window opened, such as opening a file outside the home directory. The error is returned so callers can fall back to logging when no native mechanism is available.
func OnOpenFile ¶
func OnOpenFile(cb func(string))
OnOpenFile is a no-op on platforms where the OS delivers opened file paths via argv (Linux, Windows); those are handled through the normal argv + single- instance forwarding path.
func SetLoginItem ¶
Types ¶
type SingleInstance ¶
type SingleInstance interface {
TryLock() (bool, error)
SendFilePath(path string) error
OnFileReceived(callback func(path string))
Unlock() error
}
func NewSingleInstance ¶
func NewSingleInstance(configDir string) SingleInstance
Click to show internal directories.
Click to hide internal directories.