web

package
v0.10.10 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package web runs the short-lived localhost candidate picker the CLI opens in a browser.

Index

Constants

This section is empty.

Variables

View Source
var Open = func(url string) {
	fmt.Fprintf(os.Stderr, "Open %s in your browser if it did not open.\n", url)
	_ = Browse(url)
}

Open shows url in the user's browser and always prints it too: on a headless machine the opener can start and exit without showing anything. ATMEE_NO_BROWSER only prints. Tests replace it.

Functions

func Browse

func Browse(url string) error

Browse starts the default browser on url; with ATMEE_NO_BROWSER set it does nothing.

func Pick

func Pick(pageName string, data any, timeout time.Duration) (map[string]any, error)

Pick serves a picker page with data and returns the posted choice, or nil when nothing was chosen before the timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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