colorize

package
v1.30.0 Latest Latest
Warning

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

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

Documentation

Overview

Package colorize holds the color-output primitives shared by every package that renders to a terminal: the ColorMode setting (always, never, auto with piped-output detection) and the switch that decides whether color is enabled. It is a leaf package so that both the model (checker/rules severity rendering) and the presentation layer (formatters) can use it without either owning it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSupportedColorValues

func GetSupportedColorValues() []string

func IsColorEnabled

func IsColorEnabled(colorMode ColorMode) bool

IsColorEnabled is the exported form of isColorEnabled. Lets oasdiff packages outside checker (validate, future subcommands) gate their own color logic on the same auto-detect + override convention.

func SetPipedOutput

func SetPipedOutput(val *bool) *bool

Types

type ColorMode

type ColorMode int
const (
	ColorAlways ColorMode = iota
	ColorNever
	ColorAuto
	ColorInvalid
)

func NewColorMode

func NewColorMode(color string) (ColorMode, error)

Jump to

Keyboard shortcuts

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