console

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Reset is the ANSI escape code to reset formatting.
	Reset = "\033[0m"
	// Red is the ANSI escape code for red text.
	Red = "\033[31m"
	// Green is the ANSI escape code for green text.
	Green = "\033[32m"
	// Yellow is the ANSI escape code for yellow text.
	Yellow = "\033[33m"
	// Blue is the ANSI escape code for blue text.
	Blue = "\033[34m"
	// Magenta is the ANSI escape code for magenta text.
	Magenta = "\033[35m"
	// Cyan is the ANSI escape code for cyan text.
	Cyan = "\033[36m"
	// Gray is the ANSI escape code for gray text.
	Gray = "\033[37m"
	// White is the ANSI escape code for white text.
	White = "\033[97m"
)

Functions

func BluePrintln

func BluePrintln(str string)

BluePrintln prints a string to standard output in blue.

func ColorPrintln

func ColorPrintln(str string, color string)

ColorPrintln prints a string to standard output with the specified ANSI color.

func CyanPrintln

func CyanPrintln(str string)

CyanPrintln prints a string to standard output in cyan.

func GreenPrintln

func GreenPrintln(str string)

GreenPrintln prints a string to standard output in green.

func MagentaPrintln

func MagentaPrintln(str string)

MagentaPrintln prints a string to standard output in magenta.

func ReadStr

func ReadStr(prompt string) string

ReadStr prints a prompt and reads a string from standard input.

func RedPrint

func RedPrint(str string)

RedPrint prints a string to standard output in red (alias for RedPrintln).

func RedPrintln

func RedPrintln(str string)

RedPrintln prints a string to standard output in red.

func YellowPrintln

func YellowPrintln(str string)

YellowPrintln prints a string to standard output in yellow.

Types

This section is empty.

Jump to

Keyboard shortcuts

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