Documentation ¶
Index ¶
- Constants
- Variables
- func Entry(title, msg, val string) (string, bool, error)
- func Error(title, msg string) (bool, error)
- func HasGUI() bool
- func HideConsoleWindow()
- func Info(title, msg string) (bool, error)
- func OpenCmd(cmd ...string) error
- func OpenFile(filePath string) error
- func OpenLog(logFile string) error
- func OpenURL(url string) error
- func Question(title, text string, defaultCancel bool) (bool, error)
- func StartCmd(c string, v ...string) error
- func Warning(title, msg string) (bool, error)
- type MenuItem
Constants ¶
View Source
const SystrayIcon = "files/favicon.png"
SystrayIcon is the icon in the system tray or task bar.
Variables ¶
View Source
var ErrUnsupported = fmt.Errorf("unsupported OS")
ErrUnsupported is just an error.
Functions ¶
func HasGUI ¶
func HasGUI() bool
HasGUI returns false on Linux, true on Windows and optional on macOS.
func HideConsoleWindow ¶
func HideConsoleWindow()
Types ¶
type MenuItem ¶
type MenuItem interface { Check() Checked() bool Disable() Disabled() bool Enable() Hide() SetIcon(iconBytes []byte) SetTemplateIcon(templateIconBytes []byte, regularIconBytes []byte) SetTitle(title string) SetTooltip(tooltip string) Show() String() string Uncheck() Clicked() chan struct{} }
MenuItem is an interface to allow exposing menu items to operating systems that do not have a menu or a GUI.
Click to show internal directories.
Click to hide internal directories.