Documentation
¶
Overview ¶
Package browser provides browser opening functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultBrowser ¶
type DefaultBrowser struct{}
DefaultBrowser opens URLs in the system default browser.
func NewDefaultBrowser ¶
func NewDefaultBrowser() *DefaultBrowser
NewDefaultBrowser creates a new DefaultBrowser.
func (*DefaultBrowser) Open ¶
func (b *DefaultBrowser) Open(url string) error
Open opens a URL in the default browser. On Linux, it ensures the browser is started in its own process group so that Ctrl+C doesn't kill the browser when stopping the CLI.
type MockBrowser ¶
MockBrowser is a mock implementation for testing.
func (*MockBrowser) Open ¶
func (m *MockBrowser) Open(url string) error
Open records the call and optionally calls the custom function.
Click to show internal directories.
Click to hide internal directories.