ux

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StyleSuccess = lipgloss.NewStyle().Foreground(lipgloss.Color("10"))
	StyleWarning = lipgloss.NewStyle().Foreground(lipgloss.Color("11"))
	StyleError   = lipgloss.NewStyle().Foreground(lipgloss.Color("9"))
	StyleInfo    = lipgloss.NewStyle().Foreground(lipgloss.Color("14"))

	StyleSuccessLabel = lipgloss.NewStyle().Foreground(lipgloss.Color("0")).Background(lipgloss.Color("10"))
	StyleWarningLabel = lipgloss.NewStyle().Foreground(lipgloss.Color("0")).Background(lipgloss.Color("11"))
	StyleErrorLabel   = lipgloss.NewStyle().Foreground(lipgloss.Color("0")).Background(lipgloss.Color("9"))
	StyleInfoLabel    = lipgloss.NewStyle().Foreground(lipgloss.Color("0")).Background(lipgloss.Color("14"))
)

Functions

func Ferrorf

func Ferrorf(w io.Writer, format string, a ...any)

func Finfof

func Finfof(w io.Writer, format string, a ...any)

func Fprintf

func Fprintf(w io.Writer, format string, a ...any)

func Fsuccessf

func Fsuccessf(w io.Writer, format string, a ...any)

func Fwarningf

func Fwarningf(w io.Writer, format string, a ...any)

Types

type ColFactory

type ColFactory[T any] func(T) []Row

type Row

type Row struct {
	Field string
	Value string
}

func NewRow

func NewRow(field, value string) Row

type Table

type Table struct {
	Header []string
	Rows   [][]string
}

func TableFromObjects

func TableFromObjects[T any](objects []T, rowFactory ColFactory[T]) Table

func (*Table) String

func (t *Table) String() string

Jump to

Keyboard shortcuts

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