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, each %s standing for the URL: inside a shell's -c command string a quoted reference to the BROWSER_URL variable set for it, inside PowerShell code the URL as a quoted literal, elsewhere the URL itself within that one argument
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.