ui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package ui provides small helpers for colorful, consistent terminal output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dim

func Dim(format string, a ...any)

Dim prints faint, secondary text.

func Error

func Error(format string, a ...any)

Error prints an error line in red to stderr.

func Heading

func Heading(text string)

Heading prints a bold underlined section heading.

func Info

func Info(format string, a ...any)

Info prints an informational line in cyan.

func KeyValues

func KeyValues(pairs [][2]string)

KeyValues prints aligned key/value pairs (for "show" style output).

func Label added in v0.3.0

func Label(format string, a ...any)

Label prints a bold subsection title preceded by a blank line.

func Success

func Success(format string, a ...any)

Success prints a green success line prefixed with a check mark.

func Table

func Table(headers []string, rows [][]string)

Table renders rows aligned in columns with a colored header and a separator rule. Column widths are computed from the visible (rune) length of cells, so colored cells do not break alignment — unlike text/tabwriter, which counts ANSI escape bytes.

func Warn

func Warn(format string, a ...any)

Warn prints a warning line in yellow to stderr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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