Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Refusal of anything but an absolute http or https URL with a host, which could otherwise reach a command line as an option or make an opener run a local program ErrUnsafeURL = errors.New("not an absolute http or https url") // Failure of every launcher, or no launcher at all, to take the URL ErrNoBrowser = errors.New("no browser opened the url") )
Functions ¶
Types ¶
type Launcher ¶
type Launcher struct {
Args []string // program and arguments, with %s replaced by the URL: a quoted BROWSER_URL reference inside a shell -c string, a quoted literal inside PowerShell code, and the plain URL elsewhere
Terminal bool // a text browser running in this terminal: Open waits for it and its exit status decides
Background bool // a BROWSER entry ending in &: started and left running without waiting for an early failure
}
One way Open can show a URL, a command line or, with no Args, the operating system's own URL handler
Click to show internal directories.
Click to hide internal directories.