browser

package
v0.0.71 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package browser opens URLs in whatever browser the user can actually see.

pi runs in three places that disagree about what "the browser" means: a desktop session, a remote dev container or Codespace the user reaches over SSH, and a headless CI runner. Only the first has a browser of its own, so Open works through the handoff mechanisms each environment provides and reports ErrNoHandler when there is none — letting the caller print the URL instead of failing a login that would otherwise have completed.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoHandler = errors.New("no browser handler found")

ErrNoHandler reports that the environment provides no program able to open a URL.

Functions

func Open

func Open(url string) error

Open opens url in the user's browser, returning ErrNoHandler if nothing in the environment can.

Types

This section is empty.

Jump to

Keyboard shortcuts

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