Categorygithub.com/bryanl/webbrowser
modulepackage
0.0.0-20161116104537-aa68d5a888ea
Repository: https://github.com/bryanl/webbrowser.git
Documentation: pkg.go.dev

# README

webbrowser

Go library for opening URLs using a web browser. Currently supports Linux, OSX, and Windows.

Documentation

The API documentation can be found at http://godoc.org/github.com/bryanl/webbrowser.

Example

package main

import (
    "log"

    "github.com/bryanl/webbrowser"
)

func main() {
    err := webbrowser.Open("http://blil.es", webbrowser.NewTab, true)
    if err != nil {
        log.Println("open failed:", err)
    }
}

~

# Functions

Open opens a URL in a web browser window.

# Constants

NewTab is for opening the URL in a new tab.
NewWindow is for opening the URL in a new window.
SameWindow is for opening the URL in the same window.

# Structs

LinuxOpener is an implementation of Opener for Linux.
OSXOpener is an Opener for Mac OSX.
RequireXError signifies X windows is running.
UnsupportedOSError signifies an unsupported OS.
WindowsOpener is an Opener for Windows.

# Interfaces

Opener is the interface that wraps the Open method.

# Type aliases

WindowType is a type of window to open.