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
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.
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.