launch

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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