launch

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package launch opens URLs and files with the platform's default application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Launcher

type Launcher struct {
	// contains filtered or unexported fields
}

Launcher starts platform applications without invoking a shell on macOS or Linux.

func New

func New() Launcher

func (Launcher) Open

func (l Launcher) Open(target string) error

Open only reports errors from openers that exit within openGrace. Without a desktop environment xdg-open runs the app itself and exits when the app closes, so after openGrace we stop waiting and let a goroutine collect it.

type Spool added in v1.10.2

type Spool struct {
	// contains filtered or unexported fields
}

func NewSpool added in v1.10.2

func NewSpool(parent string) *Spool

func (*Spool) Close added in v1.10.2

func (s *Spool) Close() error

func (*Spool) Write added in v1.10.2

func (s *Spool) Write(name string, data []byte) (string, error)

Each file gets its own directory so it keeps its exact name.

Jump to

Keyboard shortcuts

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