Documentation ¶
Overview ¶
Package browserenv allows URLs and files to be opened in a local web browser. The system's default browser is used. If the BROWSER environment variable is set, the command it specifies is used instead.
If the BROWSER variable contains the string "%s", that will be replaced with the URL. Otherwise, the URL is appended to the contents of BROWSER as its final argument.
BROWSER can contain multiple commands delimited by colons. Each command is tried from left to right, stopping when a command exits with a 0 exit code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Stderr io.Writer = os.Stderr
Stderr is the browser command's standard error Writer. Defaults to os.Stderr.
var Stdout io.Writer = os.Stdout
Stdout is the browser command's standard output Writer. Defaults to os.Stdout.
Functions ¶
func OpenReader ¶
OpenReader copies the contents of r to a temporary file and opens the resulting file in a browser.
Types ¶
This section is empty.