Documentation for gololang.AnsiCodes

This module provides helper functions to deal with ANSI escape codes for console outputs.

All function names are self-explanatory. They print the corresponding ANSI code.

Note that likelySupported tests if the current operating system is likely to support ANSI codes. It merely checks that the host operating system is not MS Windows, which does not support ANSI codes without a 3rd-party driver.

See also: Wikipedia on ANSI escape codes

Functions

bg_black()

bg_blue()

bg_cyan()

bg_green()

bg_magenta()

bg_red()

bg_white()

bg_yellow()

bold()

concealed()

cursor_backward(columns)

cursor_down(lines)

cursor_forward(columns)

cursor_position(line, column)

cursor_restore_position()

cursor_save_position()

cursor_up(lines)

erase_display()

erase_line()

fg_black()

fg_blue()

fg_cyan()

fg_green()

fg_magenta()

fg_red()

fg_white()

fg_yellow()

likelySupported()

reset()

reverse_video()

underscore()