Categorygithub.com/cli/browser
modulepackage
1.3.0
Repository: https://github.com/cli/browser.git
Documentation: pkg.go.dev

# README

browser

Helpers to open URLs, readers, or files in the system default web browser.

This fork adds:

  • OpenReader error wrapping;
  • ErrNotFound error wrapping on BSD;
  • Go 1.21 support.

Usage

import "github.com/cli/browser"

err = browser.OpenURL(url)
err = browser.OpenFile(path)
err = browser.OpenReader(reader)

# Packages

No description provided by the author

# Functions

OpenFile opens new browser window for the file path.
OpenReader consumes the contents of r and presents the results in a new browser window.
OpenURL opens a new browser window pointing to url.

# Variables

Stderr is the io.Writer to which executed commands write standard error.
Stdout is the io.Writer to which executed commands write standard output.