platform

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLoginItem

func IsLoginItem() bool

func Notify

func Notify(title, message string) error

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

func SetLoginItem(enabled bool, executablePath string) error

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

Jump to

Keyboard shortcuts

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