render

package
v0.0.0-...-1e5e54b Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnsiReset   = "\033[0m"
	AnsiRed     = "\033[31m"
	AnsiGreen   = "\033[32m"
	AnsiYellow  = "\033[33m"
	AnsiMagenta = "\033[35m"
	AnsiGray    = "\033[90m"
)

ANSI color codes

Variables

This section is empty.

Functions

func FormatDuration

func FormatDuration(d time.Duration) string

FormatDuration returns a human-readable duration string with spaces between hour/minute/second components (used in headers and footers).

func FormatDurationCompact

func FormatDurationCompact(d time.Duration) string

FormatDurationCompact returns a compact duration (no spaces, used in axis labels).

func GetTermWidth

func GetTermWidth() int

GetTermWidth returns the current terminal width, defaulting to 120.

func RenderLogAnalysis

func RenderLogAnalysis(analysis *logparse.LogAnalysis, buildMeta buildkite.Timeline, termWidth int) string

RenderLogAnalysis produces a waterfall chart of log section timings.

func RenderRawLog

func RenderRawLog(raw string) string

RenderRawLog strips ANSI codes from the raw log and returns clean text.

func RenderWaterfall

func RenderWaterfall(tl buildkite.Timeline, termWidth int, maxNameWidth int) string

RenderWaterfall produces the full waterfall chart as a string.

func StateColor

func StateColor(state string) string

StateColor returns the ANSI color code for a given job/section state.

func StateLabel

func StateLabel(state string) string

StateLabel returns the display label for notable job states.

Types

This section is empty.

Jump to

Keyboard shortcuts

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