rainbowprint

package
v0.9.2-139-geda05265 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package rainbowprint provides primitives for colorized output on ANSI-compliant console.

Index

Constants

View Source
const (
	// Never use ANSI codes
	Never = "never"

	// Always use ANSI codes
	Always = "always"

	// Auto detect terminal is a tty and can use ANSI codes
	Auto = "auto"
)

Variables

View Source
var (
	NextColor = rainbowColor
)

Functions

func SetANSIMode

func SetANSIMode(streams *iostreams.IOStreams, ansi string)

SetANSIMode configure formatter for colored output on ANSI-compliant console

Types

type ColorFunc

type ColorFunc func(s string) string

ColorFunc use ANSI codes to render colored text on console

Jump to

Keyboard shortcuts

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