ansi

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2016 License: BSD-2-Clause, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Colors = []string{
	"#000000", "#Dd0000", "#00CF12", "#C2CB00", "#3100CA", "#E100C6", "#00CBCB", "#C7C7C7",
	"#686868", "#FF5959", "#00FF6B", "#FAFF5C", "#775AFF", "#FF47FE", "#0FFFFF", "#FFFFFF",
}

Colors defines the standard HTML colours for ANSI.

Functions

func Black

func Black() string

Black colours text black.

func BlackBg

func BlackBg() string

BlackBg colours text in black background.

func Blink(state bool) string

Blink formats text blinking.

func Blue

func Blue() string

Blue colours text blue.

func BlueBg

func BlueBg() string

BlueBg colours text in blue background.

func Bold

func Bold(state bool) string

Bold formats text bold.

func BrightBlue

func BrightBlue() string

BrightBlue colours text bright blue.

func BrightBlueBg

func BrightBlueBg() string

BrightBlueBg colours text in bright blue background.

func BrightCyan

func BrightCyan() string

BrightCyan colours text bright cyan.

func BrightCyanBg

func BrightCyanBg() string

BrightCyanBg colours text in bright cyan background.

func BrightGreen

func BrightGreen() string

BrightGreen colours text bright green.

func BrightGreenBg

func BrightGreenBg() string

BrightGreenBg colours text in bright green background.

func BrightGrey

func BrightGrey() string

BrightGrey colours text bright grey.

func BrightGreyBg

func BrightGreyBg() string

BrightGreyBg colours text in bright grey background.

func BrightMagenta

func BrightMagenta() string

BrightMagenta colours text bright magenta.

func BrightMagentaBg

func BrightMagentaBg() string

BrightMagentaBg colours text in bright magenta background.

func BrightRed

func BrightRed() string

BrightRed colours text bright red.

func BrightRedBg

func BrightRedBg() string

BrightRedBg colours text in bright red background.

func BrightYellow

func BrightYellow() string

BrightYellow colours text bright yellow.

func BrightYellowBg

func BrightYellowBg() string

BrightYellowBg colours text in bright yellow background.

func Clear

func Clear() string

Clear clears the screen and move the cursor to the top left corner.

func Cursor

func Cursor(x, y int) string

Cursor moves the cursor to line y, column x. This indexes from the top left corner of the screen.

func Cyan

func Cyan() string

Cyan colours text cyan.

func CyanBg

func CyanBg() string

CyanBg colours text in cyan background.

func Down

func Down(n int) string

Down moves the cursor down n lines.

func Erase

func Erase() string

Erase erases everything to the left of the cursor on the line the cursor is on.

func Green

func Green() string

Green colours text green.

func GreenBg

func GreenBg() string

GreenBg colours text in green background.

func Grey

func Grey() string

Grey colours text grey.

func GreyBg

func GreyBg() string

GreyBg colours text in grey background.

func Left

func Left(n int) string

Left moves the cursor left n columns.

func Magenta

func Magenta() string

Magenta colours text magenta.

func MagentaBg

func MagentaBg() string

MagentaBg colours text in magenta background.

func Red

func Red() string

Red colours text red.

func RedBg

func RedBg() string

RedBg colours text in red background.

func RemoveEscapeSequences

func RemoveEscapeSequences()

RemoveEscapeSequences removes ANSI escape sequences.

func Reset

func Reset() string

Reset resets all colours and text styles to the default.

func Reverse

func Reverse(state bool) string

Reverse swaps foreground and background colour.

func Right(n int) string

Right moves the cursor right n columns.

func ToHTML

func ToHTML(text []byte) []byte

ToHTML converts ANSI escape sequences into HTML span tags.

func Underline

func Underline(state bool) string

Underline formats text underlined.

func Up

func Up(n int) string

Up moves the cursor up n lines.

func White

func White() string

White colours text white.

func WhiteBg

func WhiteBg() string

WhiteBg colours text in white background.

func Yellow

func Yellow() string

Yellow colours text yellow.

func YellowBg

func YellowBg() string

YellowBg colours text in yellow background.

Types

This section is empty.

Jump to

Keyboard shortcuts

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