util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenBrowser

func OpenBrowser(url string) error

OpenBrowser opens url using HNCLI_OPEN if set, otherwise the system browser.

HNCLI_OPEN is treated as a sh -c command. Use {} as a placeholder for the URL; if absent the URL is appended as the last argument. Examples:

HNCLI_OPEN="xdg-open"                          # explicit browser (default)
HNCLI_OPEN="echo {} | xclip -selection clipboard"  # Linux clipboard
HNCLI_OPEN="echo {} | wl-copy"                 # Wayland clipboard
HNCLI_OPEN="echo {} | pbcopy"                  # macOS clipboard

func StripHTML

func StripHTML(s string) string

StripHTML converts HTML to plain text suitable for terminal display.

Types

This section is empty.

Jump to

Keyboard shortcuts

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