brwsr

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: AGPL-3.0 Imports: 2 Imported by: 1

README

brwsr

Go Reference Go Report Card

brwsr provides a way to open URL links in the user's default browser, compatible with most operating systems.

Example

package main

import "github.com/speedyhoon/brwsr"

func main() {
	// Open locally hosted Godoc.
	err := brwsr.Open("https://localhost:6060")
	if err != nil {
		println(err)
	}
}

Documentation

Overview

Package brwsr implements a way to open URL links in the user's default browser, compatible with most operating systems.

Index

Examples

Constants

This section is empty.

Variables

View Source
var ErrOpen = errors.New("open failed")

ErrOpen is unable to open the default web browser for a URL.

Functions

func Open

func Open(url string) (err error)

Open a URL link in the user's default browser.

Example
package main

import (
	"github.com/speedyhoon/brwsr"
)

func main() {
	// Open locally hosted Godoc.
	err := brwsr.Open("https://localhost:6060")
	if err != nil {
		println(err)
	}
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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