ui

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyColor added in v0.3.0

func ApplyColor(colorName, symbol string) string

func ComputeRemainderWidth

func ComputeRemainderWidth(termWidth int, minWidth int, usedWidths ...int) int

func EffectiveWidths added in v0.3.0

func EffectiveWidths(header []string, rows [][]string, maxWidths []int) []int

func Errf

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

func Fail

func Fail(msg string, args ...any)

func FormatDetail added in v0.3.0

func FormatDetail(msg, time string) string

func FormatDispatchHeader added in v0.3.0

func FormatDispatchHeader(name, vcs string) string

func FormatDispatchStatusLine added in v0.3.0

func FormatDispatchStatusLine(status backend.RepoStatus, includeDetail bool) string

func FormatSummary added in v0.3.0

func FormatSummary(total int, failed []string) string

func GetTermWidth

func GetTermWidth() int

func Muted added in v0.3.0

func Muted(s string) string

func MutedStyle added in v0.3.0

func MutedStyle() lipgloss.Style

func Out added in v0.12.0

func Out(s string)

Out prints s followed by a newline. Unlike Outf it does not interpret format verbs, so it is safe for dynamic strings (paths, command output).

func Outf

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

func RenderDispatchResult

func RenderDispatchResult(res runner.Result) string

func RenderHeader added in v0.3.0

func RenderHeader(cells []string, widths []int) string

func RenderRow added in v0.3.0

func RenderRow(cells []string, widths []int) string

func RenderTable added in v0.3.0

func RenderTable(header []string, rows [][]string, widths []int) string

func SetLogger added in v0.7.0

func SetLogger(l *log.Logger)

SetLogger sets the package-level logger. Used in tests to redirect output. Passing nil restores the default logger.

func StateStyle added in v0.3.0

func StateStyle(state backend.RefState) lipgloss.Style

func Success

func Success(msg string, args ...any)

func WarnStyle added in v0.11.0

func WarnStyle() lipgloss.Style

func Warnf added in v0.12.0

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

Types

type StatusLineParts added in v0.3.0

type StatusLineParts struct {
	Ref      string
	Symbols  string
	Detail   string
	HasRef   bool
	HasError bool
	Error    string
}

func FormatStatusLine added in v0.3.0

func FormatStatusLine(status backend.RepoStatus, symStr string, detail string) StatusLineParts

Jump to

Keyboard shortcuts

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