Documentation
¶
Index ¶
- Constants
- func FormatDuration(d time.Duration) string
- func FormatDurationCompact(d time.Duration) string
- func GetTermWidth() int
- func RenderLogAnalysis(analysis *logparse.LogAnalysis, buildMeta buildkite.Timeline, termWidth int) string
- func RenderRawLog(raw string) string
- func RenderWaterfall(tl buildkite.Timeline, termWidth int, maxNameWidth int) string
- func StateColor(state string) string
- func StateLabel(state string) string
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 ¶
FormatDuration returns a human-readable duration string with spaces between hour/minute/second components (used in headers and footers).
func FormatDurationCompact ¶
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 ¶
RenderRawLog strips ANSI codes from the raw log and returns clean text.
func RenderWaterfall ¶
RenderWaterfall produces the full waterfall chart as a string.
func StateColor ¶
StateColor returns the ANSI color code for a given job/section state.
func StateLabel ¶
StateLabel returns the display label for notable job states.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.