output

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bold

func Bold(s string) string

func ErrorMsg

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

func FormatBytes

func FormatBytes(n uint64) string

func FormatTime

func FormatTime(t time.Time) string

func FormatUptime

func FormatUptime(t time.Time) string

func InfoMsg

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

func RenderTable

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

RenderTable renders a table with Lip Gloss styling.

func ShortenPath

func ShortenPath(p string) string

ShortenPath replaces the home directory prefix with ~.

func StatusColor

func StatusColor(status string) string

func SuccessMsg

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

func WarnMsg

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

Types

type Printer

type Printer struct {
	NoColor bool
}

Printer is the output abstraction for all commands.

func New

func New(noColor bool) *Printer

func (*Printer) Error

func (p *Printer) Error(format string, args ...any)

func (*Printer) Info

func (p *Printer) Info(format string, args ...any)

func (*Printer) Success

func (p *Printer) Success(format string, args ...any)

func (*Printer) Table

func (p *Printer) Table(headers []string, rows [][]string)

func (*Printer) Warn

func (p *Printer) Warn(format string, args ...any)

Jump to

Keyboard shortcuts

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