browser

package module
v0.0.0-...-5aa5ee1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2016 License: Apache-2.0 Imports: 13 Imported by: 2

README

browser

Package browser implements functions for opening a web browser

To install browser run the following command:

    go get github.com/rainycape/browser

GoDoc

Documentation

Overview

Package browser implements functions for opening a web browser.

This package also allows opening an URL back at the original host when run from an SSH session. In order for this to work, SSH agent forwarding must be enabled, the initial host must have SSH running on port 22 and the local and remote usernames must match. Otherwise a local browser is opened.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(fileOrURL string) error

Open opens the given file or URL in a browser. If fileOrUrl is a valid and existing file path, it calls OpenFile. Otherwise, it calls OpenURL.

func OpenFile

func OpenFile(path string) error

OpenFile opens the file at the given path in a browser.

func OpenURL

func OpenURL(url string) error

OpenURL opens the given URL in a browser. If the URL does not have a scheme, http is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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