Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StreamingTablePrinter ¶ added in v0.2.0
type StreamingTablePrinter struct {
// contains filtered or unexported fields
}
StreamingTablePrinter formats data as aligned columns with progressive output. Unlike TablePrinter, it outputs rows incrementally after determining column widths from an initial sample of rows.
func NewStreaming ¶ added in v0.2.0
func NewStreaming(out io.Writer) *StreamingTablePrinter
NewStreaming creates a new StreamingTablePrinter with default sample size.
func NewStreamingWithSample ¶ added in v0.2.0
func NewStreamingWithSample(out io.Writer, sampleSize int) *StreamingTablePrinter
NewStreamingWithSample creates a new StreamingTablePrinter with custom sample size.
func (*StreamingTablePrinter) AddRow ¶ added in v0.2.0
func (s *StreamingTablePrinter) AddRow(fields ...string) error
AddRow adds a row of fields to the table and outputs it (after sampling).
func (*StreamingTablePrinter) Flush ¶ added in v0.2.0
func (s *StreamingTablePrinter) Flush() error
Flush ensures any remaining buffered rows are output. Call this after adding all rows to ensure everything is written.
type TablePrinter ¶
type TablePrinter struct {
// contains filtered or unexported fields
}
TablePrinter formats data as aligned columns.
func (*TablePrinter) AddRow ¶
func (t *TablePrinter) AddRow(fields ...string)
AddRow adds a row of fields to the table.
func (*TablePrinter) Render ¶
func (t *TablePrinter) Render() error
Render outputs the formatted table.