Help us shape the future of Go! Take the 2026 Go Developer Survey

browser

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package browser opens URLs and other browser-compatible targets using the operating system's default handler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(target string) error

Open opens target with the operating system's default browser or handler.

func OpenWithRunner

func OpenWithRunner(target string, runner Runner) error

OpenWithRunner opens target using runner to execute the platform command.

Types

type Runner

type Runner interface {
	Run(name string, args ...string) error
}

Runner executes a command. Implementations can be injected with OpenWithRunner, which is useful for testing and for callers that need custom process handling.

Jump to

Keyboard shortcuts

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