Help us shape the future of Go! Take the 2026 Go Developer Survey

desktop

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package desktop installs and removes OS launcher entries that open `sift serve --app`: an XDG .desktop file on Linux and a Sift.app bundle on macOS. Other platforms report an unsupported error.

Everything is user-local (no root, no system dirs) and marked, so uninstall only ever removes files this package created: an unmarked file at one of these paths is left alone with an explanatory error. Install is idempotent and also repairs a stale entry (e.g. after the binary moved).

The icon (icon.png, embedded) is rendered from icon.svg, which copies the mark geometry from web/src/lib/favicon.ts. Re-render at 512x512 if the mark ever changes.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("desktop launchers are supported on Linux and macOS")

Functions

This section is empty.

Types

type ErrForeign

type ErrForeign struct{ Path string }

ErrForeign means a file already exists at an install path but was not created by this package; it is left alone.

func (*ErrForeign) Error

func (e *ErrForeign) Error() string

type Report

type Report struct {
	Files []string
	// Icon is false when the entry installed without its icon (macOS
	// without sips): usable, just iconless.
	Icon bool
}

func Install

func Install(version string) (Report, error)

Install creates the launcher for this OS. Re-running repairs it.

func Status

func Status() (Report, error)

func Uninstall

func Uninstall() (Report, error)

Uninstall removes the launcher for this OS. Missing files are success.

Jump to

Keyboard shortcuts

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