browser

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package browser provides utilities for opening URLs in the system's default browser.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedOS = errors.New("unsupported operating system")

ErrUnsupportedOS is returned when the current operating system is not supported for browser operations.

Functions

func Open

func Open(url string) error

Open opens the given URL in the system's default browser. It returns an error if the browser could not be launched or if the operating system is unsupported.

Supported operating systems:

  • darwin (macOS) - uses "open" command
  • linux - uses "xdg-open" command
  • windows - uses "cmd /c start" command

Types

This section is empty.

Jump to

Keyboard shortcuts

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