terminal

package
v0.0.0-...-b8497f2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorReset  = "\033[0m"
	ColorRed    = "\033[31m"
	ColorGreen  = "\033[32m"
	ColorYellow = "\033[33m"
	ColorBlue   = "\033[34m"
)

Variables

View Source
var (
	// ColorEnabled can be toggled by --no-color flag
	ColorEnabled = true
)

Functions

func Colorize

func Colorize(text string, color string) string

Colorize wraps text in ANSI color codes if enabled and output is a terminal

func Error

func Error(msg string) string

func Info

func Info(msg string) string

func IsTerminal

func IsTerminal() bool

IsTerminal checks if stdout is a terminal

func Success

func Success(msg string) string

func Warning

func Warning(msg string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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