Help us shape the future of Go! Take the 2026 Go Developer Survey

termstyle

package
v0.53.0 Latest Latest
Warning

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

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

Documentation

Overview

Package termstyle provides the self-test palette for human-readable CLI reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Style

type Style bool

Style enables ANSI styling only for an interactive output stream.

func New

func New(w io.Writer) Style

New respects redirected output and the NO_COLOR convention.

func (Style) Banner

func (s Style) Banner(title, subtitle string) string

Banner mirrors the self-test title, subtitle and rule layout.

func (Style) Bold

func (s Style) Bold(text string) string

Bold emphasizes headings and labels.

func (Style) Cyan

func (s Style) Cyan(text string) string

Cyan marks sections.

func (Style) Dim

func (s Style) Dim(text string) string

Dim de-emphasizes secondary details.

func (Style) Green

func (s Style) Green(text string) string

Green marks successful or configured values.

func (Style) Magenta

func (s Style) Magenta(text string) string

Magenta colors banner rules.

func (Style) Red

func (s Style) Red(text string) string

Red marks failures.

func (Style) Section

func (s Style) Section(title string) string

Section introduces a report section using the self-test marker.

Jump to

Keyboard shortcuts

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