desktop

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExternalBrowserLaunched = errors.New("desktop: external browser launched")
View Source
var ErrNativeDialogCanceled = errors.New("desktop: native file dialog canceled")

Functions

func ChooseSaveFilePath

func ChooseSaveFilePath(defaultName string) (string, error)

ChooseSaveFilePath is unsupported outside desktop macOS CGO builds.

func DefaultEnabled

func DefaultEnabled() bool

DefaultEnabled keeps server builds behavior unchanged, requiring an explicit -desktop flag only for binaries compiled with desktop support.

func NativeFileDialogSupported

func NativeFileDialogSupported() bool

func OpenExternalURL

func OpenExternalURL(rawURL string) error

OpenExternalURL is unavailable in server-only builds.

func PickFiles

func PickFiles() ([]string, error)

PickFiles is unsupported outside desktop macOS CGO builds.

func RunWebviewWindow

func RunWebviewWindow(address, appVersion string) error

RunWebviewWindow returns a clear error in non-desktop builds so release binaries can keep CGO disabled while exposing an explicit runtime message.

func SaveFile

func SaveFile(defaultName string, contents []byte) (string, error)

SaveFile is unsupported outside desktop macOS CGO builds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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