Documentation
¶
Overview ¶
Package browser provides utility to open a given url in web browser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Browser ¶
type Browser interface {
// OpenURL opens the given URL in a web browser.
//
// Depending on the circumstances and on the target platform, this may or
// may not cause the browser to take input focus. Because of this
// uncertainty, any caller of this method must be sure to include some
// language in its UI output to let the user know that a browser tab has
// opened somewhere, so that they can go and find it if the focus didn't
// switch automatically.
OpenURL(url string) error
}
Browser is an object that knows how to open a given URL in a new tab in some suitable browser on the current system.
func NewNativeBrowser ¶
func NewNativeBrowser() Browser
NewNativeBrowser creates and returns a Browser that will attempt to interact with the browser-launching mechanisms of the operating system where the program is currently running.
Click to show internal directories.
Click to hide internal directories.