ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bold

func Bold(s string) string

Bold returns s wrapped in bold ANSI codes (stdout).

func ColorEnabled

func ColorEnabled() bool

ColorEnabled reports whether stdout color is enabled.

func Cyan

func Cyan(s string) string

Cyan returns s wrapped in cyan ANSI codes (stdout).

func Dim

func Dim(s string) string

Dim returns s wrapped in dim ANSI codes (stdout).

func Error

func Error(msg string)

Error prints a user-facing error to stderr.

func Errorf

func Errorf(format string, args ...any)

Errorf prints a formatted user-facing error to stderr.

func FailTag

func FailTag() string

FailTag returns a red "✗" for failure indicators.

func Green

func Green(s string) string

Green returns s wrapped in green ANSI codes (stdout).

func Info

func Info(msg string)

Info prints a user-facing message to stderr with no prefix.

func InfoTag

func InfoTag() string

InfoTag returns a cyan "ℹ" for info indicators.

func Infof

func Infof(format string, args ...any)

Infof prints a formatted user-facing message to stderr with no prefix.

func OKTag

func OKTag() string

OKTag returns a green "✓" for success indicators.

func Red

func Red(s string) string

Red returns s wrapped in red ANSI codes (stdout).

func Section

func Section(title string)

Section prints a bold title with a thin underline to stdout.

func SetColorEnabled

func SetColorEnabled(enabled bool)

SetColorEnabled overrides color detection (for testing).

func SetWriter

func SetWriter(w io.Writer)

SetWriter overrides the output writer (for testing).

func Warn

func Warn(msg string)

Warn prints a user-facing warning to stderr.

func WarnTag

func WarnTag() string

WarnTag returns a yellow "⚠" for warning indicators.

func Warnf

func Warnf(format string, args ...any)

Warnf prints a formatted user-facing warning to stderr.

func Yellow

func Yellow(s string) string

Yellow returns s wrapped in yellow ANSI codes (stdout).

Types

This section is empty.

Jump to

Keyboard shortcuts

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