Documentation
¶
Overview ¶
Package browser opens a URL in the user's default browser, with a hook so tests can substitute the real implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Opener = browser.OpenURL
Opener is the function used to open URLs. Tests can replace this with a no-op or capture function.
Functions ¶
func LooksHeadless ¶
func LooksHeadless() bool
LooksHeadless reports whether the current environment seems incapable of opening a desktop browser (SSH session, no display, or non-TTY stdin). Callers use this to decide whether to attempt browser.Open at all — if headless, the URL is printed and the user opens it manually on their own machine.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.