iostreams

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorScheme

type ColorScheme struct {
	// contains filtered or unexported fields
}

ColorScheme provides semantic color methods that respect whether color output is enabled.

func NewColorScheme

func NewColorScheme(enabled bool) *ColorScheme

NewColorScheme creates a ColorScheme. When enabled is false, all methods return undecorated text.

func (*ColorScheme) Bold

func (cs *ColorScheme) Bold(s string) string

Bold renders text in bold.

func (*ColorScheme) Cyan

func (cs *ColorScheme) Cyan(s string) string

Cyan renders text in cyan.

func (*ColorScheme) FailureIcon

func (cs *ColorScheme) FailureIcon() string

FailureIcon returns a red X mark if color is enabled, plain otherwise.

func (*ColorScheme) Green

func (cs *ColorScheme) Green(s string) string

Green renders text in green.

func (*ColorScheme) Magenta

func (cs *ColorScheme) Magenta(s string) string

Magenta renders text in magenta.

func (*ColorScheme) Muted

func (cs *ColorScheme) Muted(s string) string

Muted renders text in gray (dimmed).

func (*ColorScheme) Red