Text tables for Go in ASCII, Unicode, Markdown or HTML
open sourceMITfree
tablewriter is a Go library that renders data as text tables: ASCII, Unicode, Markdown, HTML or colored terminal output. It merges cells, aligns and pads them, styles borders, takes input from CSV, structs, slices or a stream, escapes HTML and Markdown, and handles SQL null types. Custom renderers and formatters extend it.
Problems it solves
- print a table of results in my Go command-line tool
- render data as a Markdown or HTML table from Go
- show aligned columns in my Go program's terminal output
Features
- ASCII, Unicode, Markdown, HTML and ANSI-colored tables
- cell merging, alignment, padding and borders
- input from CSV, structs, slices or streaming data
- auto-escaping for HTML and Markdown output
- custom renderers and formatters
Limitations
- Version 1.0.0 is missing functionality and shouldn't be used; use 0.0.5 for legacy code or the latest 1.x release.1
Alternatives
The same job
These do what tablewriter does.
- Lip Gloss Style definitions for nice terminal layouts
- color (Go) Coloured terminal output for Go with ANSI escape codes
