utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GhDashInstallHint

func GhDashInstallHint() string

GhDashInstallHint returns the recommended install command for gh-dash.

func GhDashInstalled

func GhDashInstalled() bool

GhDashInstalled reports whether gh-dash is available in PATH.

func IsAuthError

func IsAuthError(err error) bool

IsAuthError returns true if the error looks like a GitHub auth failure, so callers can show a friendly "run gh auth login" message.

func OpenInBrowser

func OpenInBrowser(url string) error

OpenInBrowser opens url in the system default browser.

func OpenInGhDash

func OpenInGhDash(url string) (launched bool, err error)

OpenInGhDash launches gh-dash. Returns (false, nil) with browser fallback if gh-dash is not installed — callers should surface the install hint to the user. Returns (true, nil) if gh-dash launched successfully.

func Truncate

func Truncate(s string, n int) string

Truncate shortens s to at most n runes, appending "…" if truncated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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