rainbowprint

package
v0.8.6-39-g8160e8db Latest Latest
Warning

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

Go to latest
Published: May 10, 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