package tablewriter

Import Path
	github.com/olekukonko/tablewriter (on go.dev)

Dependency Relation
	imports 10 packages, and imported by one package

Involved Source Files csv.go Create & Generate text based table table_with_color.go util.go wrap.go
Package-Level Type Names (total 3)
/* sort by: | */
Bottom bool Left bool Right bool Top bool func (*Table).SetBorders(border Border)
func (*Table).Rich(row []string, colors []Colors) func (*Table).SetColumnColor(colors ...Colors) func (*Table).SetFooterColor(colors ...Colors) func (*Table).SetHeaderColor(colors ...Colors)
Append row to table Allow Support for Bulk Append Eliminates repeated for loops Clear footer Clear rows NumLines to get the number of lines Render table output Append row to table with color attributes Set Table Alignment Turn header autoformatting on/off. Default is on (true). Set Auto Merge Cells This would enable / disable the merge of cells with identical values Set Auto Merge Cells By Column Index This would enable / disable the merge of cells with identical values for specific columns If cols is empty, it is the same as `SetAutoMergeCells(true)`. Turn automatic multiline text adjustment on/off. Default is on (true). Set Table Border This would enable / disable line around the table (*Table) SetBorders(border Border) Set table Caption Set the center Separator Set the minimal width for a column Set the Default column width (*Table) SetColumnAlignment(keys []int) Adding column colors (ANSI codes) Set the Column Separator Set table Footer Set Footer Alignment Adding column colors (ANSI codes) Set table header Set Header Alignment Adding header colors (ANSI codes) Set Header Line This would enable / disable a line after the header Set New Line Set No White Space Turn automatic reflowing of multiline text when rewrapping. Default is on (true). Set Row Line This would enable / disable a line on each row of the table Set the Row Separator Set Table Padding func NewCSV(writer io.Writer, fileName string, hasHeader bool) (*Table, error) func NewCSVReader(writer io.Writer, csvReader *csv.Reader, hasHeader bool) (*Table, error) func NewWriter(writer io.Writer) *Table
Package-Level Functions (total 12)
func Color(colors ...int) []int
Simple Condition for string Returns value based on condition
Start A new table by importing from a CSV file Takes io.Writer and csv File name
Start a New Table Writer with csv.Reader This enables customisation such as reader.Comma = ';' See http://golang.org/src/pkg/encoding/csv/reader.go?s=3213:3671#L94
Start New Table Take io.Writer Directly
Pad String Attempts to place string in the center
Pad String Left position This would place string at the right side of the screen
Pad String Right position This would place string at the left side of the screen
Format Table Header Replace _ , . and spaces
Wrap wraps s into a paragraph of lines of length lim, with minimal raggedness.
WrapWords is the low-level line-breaking algorithm, useful if you need more control over the details of the text wrapping process. For most uses, WrapString will be sufficient and more convenient. WrapWords splits a list of words into lines with minimal "raggedness", treating each rune as one unit, accounting for spc units between adjacent words on each line, and attempting to limit lines to lim units. Raggedness is the total error over all lines, where error is the square of the difference of the length of the line and lim. Too-long lines (which only happen when a single word is longer than lim units) have pen penalty units added to the error.
Package-Level Constants (total 48)
const ALIGN_CENTER = 1
const ALIGN_DEFAULT = 0
const ALIGN_LEFT = 3
const ALIGN_RIGHT = 2
const BgBlackColor int = 40
const BgBlueColor int = 44
const BgCyanColor int = 46
const BgGreenColor int = 42
const BgHiBlackColor int = 100
const BgHiBlueColor int = 104
const BgHiCyanColor int = 106
const BgHiGreenColor int = 102
const BgHiMagentaColor int = 105
const BgHiRedColor int = 101
const BgHiWhiteColor int = 107
const BgHiYellowColor int = 103
const BgMagentaColor int = 45
const BgRedColor int = 41
const BgWhiteColor int = 47
const BgYellowColor int = 43
const Bold = 1
const CENTER = "+"
const COLUMN = "|"
const ESC = "\x1b"
const FgBlackColor int = 30
const FgBlueColor int = 34
const FgCyanColor int = 36
const FgGreenColor int = 32
const FgHiBlackColor int = 90
const FgHiBlueColor int = 94
const FgHiCyanColor int = 96
const FgHiGreenColor int = 92
const FgHiMagentaColor int = 95
const FgHiRedColor int = 91
const FgHiWhiteColor int = 97
const FgHiYellowColor int = 93
const FgMagentaColor int = 35
const FgRedColor int = 31
const FgWhiteColor int = 37
const FgYellowColor int = 33
const Italic = 4
const MAX_ROW_WIDTH = 30
const NEWLINE = "\n"
const Normal = 0
const ROW = "-"
const SEP = ";"
const SPACE = " "
const UnderlineSingle = 4