color

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoColor bool

NoColor disables all color output when set to true. This is set by the --color=none flag or the DASH0_COLOR=none environment variable.

Functions

func SprintSeverity

func SprintSeverity(sev string, width int) string

SprintSeverity returns the severity string color-coded and padded to width visible characters for terminal output. When width is 0, no padding is applied. When color is disabled (via NoColor) or stdout is not a TTY, the severity is returned as plain left-padded text.

func SprintSpanStatus

func SprintSpanStatus(status string, width int) string

SprintSpanStatus returns the span status string color-coded and padded to width visible characters for terminal output. When width is 0, no padding is applied.

func StderrOutput added in v1.7.0

func StderrOutput() *termenv.Output

StderrOutput returns a termenv output for stderr, respecting the NoColor flag.

func StdoutOutput added in v1.7.0

func StdoutOutput() *termenv.Output

StdoutOutput returns a termenv output for stdout, respecting the NoColor flag.

Types

This section is empty.

Jump to

Keyboard shortcuts

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