Documentation
¶
Overview ¶
Package table merges two table engines behind one facade: aquasecurity (StyleAqua, the default: bordered unicode tables) and rodaine (StyleRodaine: borderless padded columns, most script-friendly). Engines live in subpackages with their upstream APIs intact; new styles arrive as new Style values without breaking callers.
Fork attributions:
engine aqua: github.com/aquasecurity/table, MIT, Copyright (c) 2022 Aqua Security engine rodaine: github.com/rodaine/table, MIT, Copyright (c) 2015 Chris Roche
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Style ¶
type Style int
Style selects the rendering engine. New styles arrive as new values; unknown values fail Render instead of silently picking one.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table buffers a header plus string rows and renders on demand.
func (*Table) Render ¶
Render draws the table with the selected engine. Rows normalize to the header width (short rows pad empty, long rows truncate), matching script-friendly expectations on both engines.
func (*Table) SetHeaders ¶
SetHeaders replaces the header row.