Documentation
¶
Overview ¶
Pretty prints to the terminal using ANSI escape codes.
Index ¶
- Constants
- func BackgroundColour(colour prettyBackgroundColour) prettyBackgroundColour
- func Colour(colour prettyColour) prettyColour
- func Printf(a any, f ...any)
- func Println(a any, f ...any)
- func Sprintf(a any, f ...any) string
- func WithBold() prettyFormat
- func WithDim() prettyFormat
- func WithItalic() prettyFormat
- func WithRapidBlink() prettyFormat
- func WithSlowBlink() prettyFormat
- func WithStrikethrough() prettyFormat
- func WithUnderline() prettyFormat
- type BackgroundRgb
- type Link
- type Rgb
Constants ¶
View Source
const ( Black prettyColour = iota + 30 Red Green Yellow Blue Magenta Cyan White )
View Source
const ( BrightGray prettyColour = iota + 90 BrightRed BrightGreen BrightYellow BrightBlue BrightMagenta BrightCyan BrightWhite )
View Source
const ( BackgroundBlack prettyBackgroundColour = iota + 40 BackgroundRed BackgroundGreen BackgroundYellow BackgroundBlue BackgroundMagenta BackgroundCyan BackgroundWhite )
View Source
const ( BackgroundBrightGray prettyBackgroundColour = iota + 100 BackgroundBrightRed BackgroundBrightGreen BackgroundBrightYellow BackgroundBrightBlue BackgroundBrightMagenta BackgroundBrightCyan BackgroundBrightWhite )
View Source
const ( Bold prettyFormat = 1 Dim prettyFormat = 2 Italic prettyFormat = 3 Underline prettyFormat = 4 SlowBlink prettyFormat = 5 RapidBlink prettyFormat = 6 Strikethrough prettyFormat = 9 )
Variables ¶
This section is empty.
Functions ¶
func BackgroundColour ¶
func BackgroundColour(colour prettyBackgroundColour) prettyBackgroundColour
func Println ¶
Applies the supplied format and prints the result, with trailing newline, to standard out.
func WithItalic ¶
func WithItalic() prettyFormat
func WithRapidBlink ¶
func WithRapidBlink() prettyFormat
func WithSlowBlink ¶
func WithSlowBlink() prettyFormat
func WithStrikethrough ¶
func WithStrikethrough() prettyFormat
func WithUnderline ¶
func WithUnderline() prettyFormat
Types ¶
type BackgroundRgb ¶
type BackgroundRgb Rgb
func WithBackgroundRgb ¶
func WithBackgroundRgb(r, g, b uint8) BackgroundRgb
Click to show internal directories.
Click to hide internal directories.