browser

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package browser provides a means of opening a URL in the user's default web browser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Browser

type Browser struct {
	// contains filtered or unexported fields
}

Browser is a Launcher that opens URLs in a real web browser.

Its zero value is a valid instance.

func (*Browser) OpenURL

func (b *Browser) OpenURL(url string) error

OpenURL opens the URL in the user's default web browser.

type Launcher

type Launcher interface {
	// OpenURL opens the specified URL.
	OpenURL(url string) error
}

Launcher launches the web browser.

type Noop

type Noop struct{}

Noop is a Launcher that does nothing. Its zero value is a valid instance.

func (*Noop) OpenURL

func (*Noop) OpenURL(string) error

OpenURL does nothing.

Directories

Path Synopsis
Package browsertest provides test helpers for browser support.
Package browsertest provides test helpers for browser support.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL