Documentation
¶
Index ¶
- type Ocean
- func (s *Ocean) Config() tw.RendererConfig
- func (s *Ocean) Debug() []string
- func (s *Ocean) End(w io.Writer) error
- func (s *Ocean) Footer(w io.Writer, footerRow []string) error
- func (s *Ocean) Header(w io.Writer, headerRow []string) error
- func (s *Ocean) Reset()
- func (s *Ocean) Row(w io.Writer, row []string) error
- func (s *Ocean) Start(w io.Writer) error
- type OceanConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ocean ¶
type Ocean struct {
// contains filtered or unexported fields
}
Ocean is a streaming table renderer that writes ASCII tables with fixed column widths.
func NewOcean ¶
NewOcean initializes an Ocean renderer with the given writer, debug setting, and configuration. It validates column widths and applies defaults for unset fields.
func (*Ocean) Config ¶
func (s *Ocean) Config() tw.RendererConfig
Config returns a RendererConfig representation of the current configuration.
type OceanConfig ¶
type OceanConfig struct {
ColumnWidths []int // Widths for each column
Symbols tw.Symbols // Symbols for table borders and separators
Borders tw.Border // Border visibility settings
ColumnAligns []tw.Align // Per-column alignment overrides
HeaderAlign tw.Align // Default alignment for header cells
RowAlign tw.Align // Default alignment for row cells
Padding tw.Padding // Padding characters for cells
TrimWhitespace tw.State // Whether to trim whitespace from cell content
ShowHeaderLine bool // Whether to render a separator line after the header
}
OceanConfig defines the configuration for the Ocean table renderer.
Click to show internal directories.
Click to hide internal directories.