Versions in this module Expand all Collapse all v1 v1.0.5 Jan 21, 2022 Changes in this version + const AXIS_LEFT + const AXIS_RIGHT + const BLACK + const BLUE + const CYAN + const DEFAULT_BORDER + const DRAW_INDEPENDENT + const DRAW_RELATIVE + const GREEN + const MAGENTA + const PCT + const RED + const RESET + const RESET_COLOR + const RESET_LINE + const WHITE + const YELLOW + var ANSI_RE = regexp.MustCompile(`\\0\d+\[\d+(?:;\d+)?m`) + var Output *bufio.Writer = bufio.NewWriter(os.Stdout) + var Screen *bytes.Buffer = new(bytes.Buffer) + func Background(str string, color int) string + func Bold(str string) string + func Clear() + func Color(str string, color int) string + func Context(data string, idx, max int) string + func CurrentHeight() int + func Flush() + func GetXY(x int, y int) (int, int) + func Height() int + func Highlight(str, substr string, color int) string + func HighlightRegion(str string, from, to, color int) string + func MoveCursor(x int, y int) + func MoveCursorBackward(bias int) + func MoveCursorDown(bias int) + func MoveCursorForward(bias int) + func MoveCursorUp(bias int) + func MoveTo(str string, x int, y int) (out string) + func Print(a ...interface{}) (n int, err error) + func Printf(format string, a ...interface{}) (n int, err error) + func Println(a ...interface{}) (n int, err error) + func ResetLine(str string) (out string) + func Width() int + type Box struct + Border string + Buf *bytes.Buffer + Flags int + Height int + PaddingX int + PaddingY int + Width int + func NewBox(width, height int, flags int) *Box + func (b *Box) String() (out string) + func (b *Box) Write(p []byte) (int, error) + type Chart interface + Draw func(data DataTable, flags int) string + type DataTable struct + func (d *DataTable) AddColumn(name string) + func (d *DataTable) AddRow(elms ...float64) + type LineChart struct + Buf []string + Flags int + Height int + Width int + func NewLineChart(width, height int) *LineChart + func (c *LineChart) Draw(data *DataTable) (out string) + func (c *LineChart) DrawAxes(maxX, minX, maxY, minY float64, index int) + func (c *LineChart) DrawLine(x0, y0, x1, y1 int, symbol string) + type Table struct + Buf *bytes.Buffer + func NewTable(minwidth, tabwidth, padding int, padchar byte, flags uint) *Table + func (t *Table) String() string