console

package
v0.0.0-...-3fa40c8 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ColorBlack is the black foreground color.
	ColorBlack = "\033[0;30m"

	// ColorGray is the gray foreground color.
	ColorGray = "\033[1;30m"

	// ColorRed is the red foreground color.
	ColorRed = "\033[0;31m"

	// ColorBrightRed is the bright red foreground color.
	ColorBrightRed = "\033[1;31m"

	// ColorGreen is the green foreground color.
	ColorGreen = "\033[0;32m"

	// ColorBrightGreen is the bright green foreground color.
	ColorBrightGreen = "\033[1;32m"

	// ColorYellow is the yellow foreground color.
	ColorYellow = "\033[0;33m"

	// ColorBrightYellow is the yellow foreground color.
	ColorBrightYellow = "\033[1;33m"

	// ColorBlue is the blue foreground color.
	ColorBlue = "\033[0;34m"

	// ColorBrightBlue is the bright blue foreground color.
	ColorBrightBlue = "\033[1;34m"

	// ColorMagenta is the magenta foreground color.
	ColorMagenta = "\033[0;35m"

	// ColorBrightMagenta is the bright magenta foreground color.
	ColorBrightMagenta = "\033[1;35m"

	// ColorCyan is the cyan foreground color.
	ColorCyan = "\033[0;36m"

	// ColorBrightCyan is the bright cyan foreground color.
	ColorBrightCyan = "\033[1;36m"

	// ColorWhite is the white foreground color.
	ColorWhite = "\033[0;37m"

	// ColorBrightWhite is the bright white foreground color.
	ColorBrightWhite = "\033[1;37m"

	// ColorReset is the code to reset all attributes.
	ColorReset = "\033[0m"
)

Variables

View Source
var (
	// Output is a writer where the messages are sent.
	Output io.Writer = os.Stderr

	// ExitHandler is a function called to exit the process.
	ExitHandler = os.Exit
)

Functions

func Error

func Error(format string, a ...interface{})

Error displays an error message.

func Fatal

func Fatal(format string, a ...interface{})

Fatal prints a fatal error message and exists the process.

func Message

func Message(format string, a ...interface{})

Message displays an informative message.

func Printf

func Printf(format string, a ...interface{})

Printf prints a message without any formatting.

func Success

func Success(format string, a ...interface{})

Success displays a success message.

func Warning

func Warning(format string, a ...interface{})

Warning displays a warning message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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