Documentation
¶
Index ¶
- Constants
- Variables
- type Align
- type Border
- type BorderStyle
- type CellCallbacks
- type CellConfig
- type CellContext
- type CellFilter
- type CellFormatting
- type CellPadding
- type Filter
- type Formatter
- type Formatting
- type KeyValuePair
- type Level
- type Lines
- type Location
- type Mapper
- func (m Mapper[K, V]) Clone() Mapper[K, V]
- func (m Mapper[K, V]) Delete(key K)
- func (m Mapper[K, V]) Each(fn func(K, V))
- func (m Mapper[K, V]) Filter(fn func(K, V) bool) Mapper[K, V]
- func (m Mapper[K, V]) Get(key K) V
- func (m Mapper[K, V]) Has(key K) bool
- func (m Mapper[K, V]) Keys() []K
- func (m Mapper[K, V]) Len() int
- func (m Mapper[K, V]) MapValues(fn func(V) V) Mapper[K, V]
- func (m Mapper[K, V]) OK(key K) (V, bool)
- func (m Mapper[K, V]) Set(key K, value V)
- func (m Mapper[K, V]) Slicer() Slicer[KeyValuePair[K, V]]
- func (m Mapper[K, V]) Values() []V
- type MergeState
- type MergeStateOption
- type Padding
- type Position
- type Renderer
- type RendererConfig
- type RowContext
- type Separators
- type Settings
- type Slicer
- func (s Slicer[T]) Append(elements ...T) Slicer[T]
- func (s Slicer[T]) Clone() Slicer[T]
- func (s Slicer[T]) Contains(fn func(T) bool) bool
- func (s Slicer[T]) Each(fn func(T))
- func (s Slicer[T]) Filter(fn func(T) bool) Slicer[T]
- func (s Slicer[T]) Find(fn func(T) bool) (T, bool)
- func (s Slicer[T]) First() T
- func (s Slicer[T]) Get(index int) T
- func (s Slicer[T]) GetOK(index int) (T, bool)
- func (s Slicer[T]) Has(index int) bool
- func (s Slicer[T]) IsEmpty() bool
- func (s Slicer[T]) Last() T
- func (s Slicer[T]) Len() int
- func (s Slicer[T]) Map(fn func(T) T) Slicer[T]
- func (s Slicer[T]) Prepend(elements ...T) Slicer[T]
- type State
- type Streamer
- type SymbolASCII
- func (s *SymbolASCII) BottomLeft() string
- func (s *SymbolASCII) BottomMid() string
- func (s *SymbolASCII) BottomRight() string
- func (s *SymbolASCII) Center() string
- func (s *SymbolASCII) Column() string
- func (s *SymbolASCII) HeaderLeft() string
- func (s *SymbolASCII) HeaderMid() string
- func (s *SymbolASCII) HeaderRight() string
- func (s *SymbolASCII) MidLeft() string
- func (s *SymbolASCII) MidRight() string
- func (s *SymbolASCII) Name() string
- func (s *SymbolASCII) Row() string
- func (s *SymbolASCII) TopLeft() string
- func (s *SymbolASCII) TopMid() string
- func (s *SymbolASCII) TopRight() string
- type SymbolGraphical
- func (s *SymbolGraphical) BottomLeft() string
- func (s *SymbolGraphical) BottomMid() string
- func (s *SymbolGraphical) BottomRight() string
- func (s *SymbolGraphical) Center() string
- func (s *SymbolGraphical) Column() string
- func (s *SymbolGraphical) HeaderLeft() string
- func (s *SymbolGraphical) HeaderMid() string
- func (s *SymbolGraphical) HeaderRight() string
- func (s *SymbolGraphical) MidLeft() string
- func (s *SymbolGraphical) MidRight() string
- func (s *SymbolGraphical) Name() string
- func (s *SymbolGraphical) Row() string
- func (s *SymbolGraphical) TopLeft() string
- func (s *SymbolGraphical) TopMid() string
- func (s *SymbolGraphical) TopRight() string
- type SymbolMarkdown
- func (s *SymbolMarkdown) BottomLeft() string
- func (s *SymbolMarkdown) BottomMid() string
- func (s *SymbolMarkdown) BottomRight() string
- func (s *SymbolMarkdown) Center() string
- func (s *SymbolMarkdown) Column() string
- func (s *SymbolMarkdown) HeaderLeft() string
- func (s *SymbolMarkdown) HeaderMid() string
- func (s *SymbolMarkdown) HeaderRight() string
- func (s *SymbolMarkdown) MidLeft() string
- func (s *SymbolMarkdown) MidRight() string
- func (s *SymbolMarkdown) Name() string
- func (s *SymbolMarkdown) Row() string
- func (s *SymbolMarkdown) TopLeft() string
- func (s *SymbolMarkdown) TopMid() string
- func (s *SymbolMarkdown) TopRight() string
- type SymbolMerger
- func (s *SymbolMerger) BottomLeft() string
- func (s *SymbolMerger) BottomMid() string
- func (s *SymbolMerger) BottomRight() string
- func (s *SymbolMerger) Center() string
- func (s *SymbolMerger) Column() string
- func (s *SymbolMerger) HeaderLeft() string
- func (s *SymbolMerger) HeaderMid() string
- func (s *SymbolMerger) HeaderRight() string
- func (s *SymbolMerger) MidLeft() string
- func (s *SymbolMerger) MidRight() string
- func (s *SymbolMerger) Name() string
- func (s *SymbolMerger) Row() string
- func (s *SymbolMerger) TopLeft() string
- func (s *SymbolMerger) TopMid() string
- func (s *SymbolMerger) TopRight() string
- type SymbolNothing
- func (s *SymbolNothing) BottomLeft() string
- func (s *SymbolNothing) BottomMid() string
- func (s *SymbolNothing) BottomRight() string
- func (s *SymbolNothing) Center() string
- func (s *SymbolNothing) Column() string
- func (s *SymbolNothing) HeaderLeft() string
- func (s *SymbolNothing) HeaderMid() string
- func (s *SymbolNothing) HeaderRight() string
- func (s *SymbolNothing) MidLeft() string
- func (s *SymbolNothing) MidRight() string
- func (s *SymbolNothing) Name() string
- func (s *SymbolNothing) Row() string
- func (s *SymbolNothing) TopLeft() string
- func (s *SymbolNothing) TopMid() string
- func (s *SymbolNothing) TopRight() string
- type SymbolUnicode
- func (s *SymbolUnicode) BottomLeft() string
- func (s *SymbolUnicode) BottomMid() string
- func (s *SymbolUnicode) BottomRight() string
- func (s *SymbolUnicode) Center() string
- func (s *SymbolUnicode) Column() string
- func (s *SymbolUnicode) HeaderLeft() string
- func (s *SymbolUnicode) HeaderMid() string
- func (s *SymbolUnicode) HeaderRight() string
- func (s *SymbolUnicode) MidLeft() string
- func (s *SymbolUnicode) MidRight() string
- func (s *SymbolUnicode) Name() string
- func (s *SymbolUnicode) Row() string
- func (s *SymbolUnicode) TopLeft() string
- func (s *SymbolUnicode) TopMid() string
- func (s *SymbolUnicode) TopRight() string
- type Symbols
Constants ¶
const ( NameASCII = "ascii" NameUnicode = "unicode" NameNothing = "nothing" NameMarkdown = "markdown" NameGraphical = "graphical" NameMerger = "merger" )
Private: Style name constants
const ( Fail = -1 // Operation failed Success = 1 // Operation succeeded )
Operation Status Constants Used to indicate the success or failure of operations
const ( Empty = "" Skip = "" Space = " " NewLine = "\n" )
const ( WrapNone = iota // No wrapping WrapNormal // Standard word wrapping WrapTruncate // Truncate text with ellipsis WrapBreak // Break words to fit )
Text Wrapping Constants Defines text wrapping behavior in table cells
const ( MergeNone = iota // No merging MergeVertical // Merge cells vertically MergeHorizontal // Merge cells horizontally MergeBoth // Merge both vertically and horizontally MergeHierarchical // Hierarchical merging )
const ( CharEllipsis = "…" // Ellipsis character for truncation CharBreak = "↩" // Break character for wrapping )
Special Character Constants Defines special characters used in formatting
Variables ¶
BorderNone defines a border configuration with all sides disabled.
Functions ¶
This section is empty.
Types ¶
type Border ¶
type Border struct {
Left State // Left border visibility
Right State // Right border visibility
Top State // Top border visibility
Bottom State // Bottom border visibility
}
Border defines the visibility states of table borders.
type BorderStyle ¶
type BorderStyle int
BorderStyle defines different border styling options
const ( StyleNone BorderStyle = iota StyleASCII StyleLight StyleHeavy StyleDouble StyleLightHeavy StyleHeavyLight StyleLightDouble StyleDoubleLight StyleRounded StyleMarkdown StyleGraphical StyleMerger )
Border style constants
func (BorderStyle) String ¶
func (s BorderStyle) String() string
String returns the string representation of a border style
type CellCallbacks ¶
type CellCallbacks struct {
Global func() // Global callback applied to all cells
PerColumn []func() // Column-specific callbacks
}
CellCallbacks holds callback functions for cell processing. Note: These are currently placeholders and not fully implemented.
type CellConfig ¶
type CellConfig struct {
Formatting CellFormatting // Cell formatting options
Padding CellPadding // Padding configuration
Callbacks CellCallbacks // Callback functions (unused)
Filter CellFilter // Function to filter cell content (renamed from Filter Filter)
ColumnAligns []Align // Per-column alignment overrides
ColMaxWidths map[int]int // Per-column maximum width overrides
}
CellConfig combines formatting, padding, and callback settings for a table section.
type CellContext ¶
type CellContext struct {
Data string // Content to be displayed in the cell, provided by the caller
Align Align // Text alignment within the cell (Left, Right, Center, Skip)
Padding Padding // Padding characters surrounding the cell content
Width int // Suggested width (often overridden by Row.Widths)
Merge MergeState // Details about cell spanning across rows or columns
}
CellContext defines the properties and formatting state of an individual table cell.
type CellFilter ¶
type CellFilter struct {
Global func([]string) []string // Processes the entire row
PerColumn []func(string) string // Processes individual cells by column
}
CellFilter defines filtering functions for cell content.
type CellFormatting ¶
type CellFormatting struct {
Alignment Align // Text alignment within the cell (e.g., Left, Right, Center)
AutoWrap int // Wrapping behavior (e.g., WrapTruncate, WrapNormal)
AutoFormat bool // Enables automatic formatting (e.g., title case for headers)
MaxWidth int // Maximum content width for the cell
MergeMode int // Bitmask for merge behavior (e.g., MergeHorizontal, MergeVertical)
}
CellFormatting holds formatting options for table cells.
type CellPadding ¶
type CellPadding struct {
Global Padding // Default padding applied to all cells
PerColumn []Padding // Column-specific padding overrides
}
CellPadding defines padding settings for table cells.
type Filter ¶
Filter defines a function type for processing cell content. It takes a slice of strings and returns a processed slice.
type Formatting ¶
type Formatting struct {
Row RowContext // Detailed configuration for the row and its cells
Level Level // Hierarchical level (Header, Body, Footer) affecting line drawing
IsSubRow bool // Marks this as a continuation or padding line in multi-line rows
Debug bool // Enables debug logging when true
NormalizedWidths Mapper[int, int]
}
Formatting encapsulates the complete formatting context for a table row. It provides all necessary information to render a row correctly within the table structure.
type KeyValuePair ¶
type KeyValuePair[K comparable, V any] struct { Key K Value V }
KeyValuePair represents a single key-value pair from a Mapper.
type Lines ¶
type Lines struct {
ShowTop State // Top border visibility
ShowBottom State // Bottom border visibility
ShowHeaderLine State // Header separator line visibility
}
Lines manages the visibility of table boundary lines.
type Mapper ¶
type Mapper[K comparable, V any] map[K]V
Mapper is a generic map type with comparable keys and any value type. It provides type-safe operations on maps with additional convenience methods.
func NewMapper ¶
func NewMapper[K comparable, V any]() Mapper[K, V]
NewMapper creates and returns a new initialized Mapper.
func SlicerToMapper ¶
func SlicerToMapper[K comparable, V any](s Slicer[KeyValuePair[K, V]]) Mapper[K, V]
SlicerToMapper converts a Slicer of KeyValuePair to a Mapper.
func (Mapper[K, V]) Delete ¶
func (m Mapper[K, V]) Delete(key K)
Delete removes the specified key from the map. Does nothing if the key doesn't exist or the map is nil.
func (Mapper[K, V]) Each ¶
func (m Mapper[K, V]) Each(fn func(K, V))
Each iterates over each key-value pair in the map and calls the provided function. Does nothing if the map is nil.
func (Mapper[K, V]) Filter ¶
Filter returns a new Mapper containing only the key-value pairs that satisfy the predicate.
func (Mapper[K, V]) Get ¶
func (m Mapper[K, V]) Get(key K) V
Get returns the value associated with the key. If the key doesn't exist or the map is nil, it returns the zero value for the value type.
func (Mapper[K, V]) Keys ¶
func (m Mapper[K, V]) Keys() []K
Keys returns a slice containing all keys in the map. Returns nil if the map is nil or empty.
func (Mapper[K, V]) Len ¶
Len returns the number of elements in the map. Returns 0 if the map is nil.
func (Mapper[K, V]) MapValues ¶
MapValues returns a new Mapper with the same keys but values transformed by the provided function.
func (Mapper[K, V]) OK ¶
OK returns the value associated with the key and a boolean indicating whether the key exists.
func (Mapper[K, V]) Set ¶
func (m Mapper[K, V]) Set(key K, value V)
Set sets the value for the specified key. Does nothing if the map is nil.
func (Mapper[K, V]) Slicer ¶
func (m Mapper[K, V]) Slicer() Slicer[KeyValuePair[K, V]]
Slicer converts the Mapper to a Slicer of key-value pairs.
type MergeState ¶
type MergeState struct {
Vertical MergeStateOption // Properties for vertical merging (across rows)
Horizontal MergeStateOption // Properties for horizontal merging (across columns)
Hierarchical MergeStateOption // Properties for nested/hierarchical merging
}
MergeState captures how a cell merges across different directions.
type MergeStateOption ¶
type MergeStateOption struct {
Present bool // True if this merge direction is active
Span int // Number of cells this merge spans
Start bool // True if this cell is the starting point of the merge
End bool // True if this cell is the ending point of the merge
}
MergeStateOption represents common attributes for merging in a specific direction.
type Position ¶
type Position string
Position Type and Constants Position defines where formatting applies in the table
type Renderer ¶
type Renderer interface {
Start(w io.Writer) error
Header(w io.Writer, headers [][]string, ctx Formatting) // Renders table header
Row(w io.Writer, row []string, ctx Formatting) // Renders a single row
Line(w io.Writer, ctx Formatting) // Renders separator line
Debug() []string // Returns debug trace
Config() RendererConfig // Returns renderer config
Close(w io.Writer) error
}
Renderer defines the interface for rendering tables to an io.Writer. Implementations must handle headers, rows, footers, and separator lines.
type RendererConfig ¶
type RendererConfig struct {
Borders Border // Border visibility settings
Symbols Symbols // Symbols used for table drawing
Settings Settings // Rendering behavior settings
Debug bool // Enables debug mode
}
RendererConfig holds the configuration for the default renderer.
type RowContext ¶
type RowContext struct {
Position Position // Section of the table (Header, Row, Footer)
Location Location // Boundary position (First, Middle, End)
Current map[int]CellContext // Cells in this row, indexed by column
Previous map[int]CellContext // Cells from the row above; nil if none
Next map[int]CellContext // Cells from the row below; nil if none
Widths Mapper[int, int] // Computed widths for each column
ColMaxWidths map[int]int // Maximum allowed width per column
}
RowContext manages layout properties and relationships for a row and its columns. It maintains state about the current row and its neighbors for proper rendering.
type Separators ¶
type Separators struct {
ShowHeader State // Controls header separator visibility
BetweenRows State // Determines if lines appear between rows
BetweenColumns State // Determines if separators appear between columns
}
Separators controls the visibility of separators in the table.
type Settings ¶
type Settings struct {
Separators Separators // Separator visibility settings
Lines Lines // Line visibility settings
TrimWhitespace State // Trims whitespace from cell content if enabled
CompactMode State // Reserved for future compact rendering (unused)
}
Settings holds configuration preferences for rendering behavior.
type Slicer ¶
type Slicer[T any] []T
Slicer is a generic slice type that provides additional methods for slice manipulation.
func (Slicer[T]) Contains ¶
Contains returns true if the slice contains an element that satisfies the predicate.
func (Slicer[T]) Each ¶
func (s Slicer[T]) Each(fn func(T))
Each iterates over each element in the slice and calls the provided function. Does nothing if the slice is nil.
func (Slicer[T]) Filter ¶
Filter returns a new Slicer containing only elements that satisfy the predicate.
func (Slicer[T]) Find ¶
Find returns the first element that satisfies the predicate, along with a boolean indicating if it was found.
func (Slicer[T]) First ¶
func (s Slicer[T]) First() T
First returns the first element of the slice, or the zero value if empty.
func (Slicer[T]) Get ¶
Get returns the element at the specified index. Returns the zero value if the index is out of bounds or the slice is nil.
func (Slicer[T]) GetOK ¶
GetOK returns the element at the specified index and a boolean indicating whether the index was valid.
func (Slicer[T]) Last ¶
func (s Slicer[T]) Last() T
Last returns the last element of the slice, or the zero value if empty.
func (Slicer[T]) Len ¶
Len returns the number of elements in the slice. Returns 0 if the slice is nil.
type State ¶
type State int
State represents an on/off state
Feature State Constants Represents enabled/disabled states for features
type Streamer ¶
type Streamer interface {
// Start initializes the stream and writes any leading elements (e.g., top border, <table>).
// It should also reset any internal state of the renderer.
Start(w io.Writer) error
// Header renders a single header row. May be called multiple times
// for multi-line headers if the specific implementation supports it.
// Should handle drawing separators below if configured.
Header(w io.Writer, header []string) error
// Row RenderRow renders a single data row.
Row(w io.Writer, row []string) error
// Should handle drawing separators above if configured.
Footer(w io.Writer, footer []string) error
// End finalizes the stream and writes any trailing elements (e.g., bottom border, </table>).
End(w io.Writer) error
// Debug returns trace information accumulated during rendering.
Debug() []string
// Reset clears internal state. Typically called by Start.
Reset()
// Config provides basic configuration details back to the core if needed,
// though its utility is limited for streaming renderers compared to batch renderers.
// It might return info like Symbols or Border settings used.
Config() RendererConfig
}
Streamer defines the interface for renderers that support incremental, row-by-row output without batching, typically requiring pre-defined column widths or other fixed layout information.
type SymbolASCII ¶
type SymbolASCII struct{}
SymbolASCII provides basic SymbolASCII border symbols
func (*SymbolASCII) BottomLeft ¶
func (s *SymbolASCII) BottomLeft() string
func (*SymbolASCII) BottomMid ¶
func (s *SymbolASCII) BottomMid() string
func (*SymbolASCII) BottomRight ¶
func (s *SymbolASCII) BottomRight() string
func (*SymbolASCII) Center ¶
func (s *SymbolASCII) Center() string
func (*SymbolASCII) Column ¶
func (s *SymbolASCII) Column() string
func (*SymbolASCII) HeaderLeft ¶
func (s *SymbolASCII) HeaderLeft() string
func (*SymbolASCII) HeaderMid ¶
func (s *SymbolASCII) HeaderMid() string
func (*SymbolASCII) HeaderRight ¶
func (s *SymbolASCII) HeaderRight() string
func (*SymbolASCII) MidLeft ¶
func (s *SymbolASCII) MidLeft() string
func (*SymbolASCII) MidRight ¶
func (s *SymbolASCII) MidRight() string
func (*SymbolASCII) Row ¶
func (s *SymbolASCII) Row() string
func (*SymbolASCII) TopLeft ¶
func (s *SymbolASCII) TopLeft() string
func (*SymbolASCII) TopMid ¶
func (s *SymbolASCII) TopMid() string
func (*SymbolASCII) TopRight ¶
func (s *SymbolASCII) TopRight() string
type SymbolGraphical ¶
type SymbolGraphical struct{}
SymbolGraphical provides border symbols using emoji/emoticons
func (*SymbolGraphical) BottomLeft ¶
func (s *SymbolGraphical) BottomLeft() string
func (*SymbolGraphical) BottomMid ¶
func (s *SymbolGraphical) BottomMid() string
func (*SymbolGraphical) BottomRight ¶
func (s *SymbolGraphical) BottomRight() string
func (*SymbolGraphical) Center ¶
func (s *SymbolGraphical) Center() string
func (*SymbolGraphical) Column ¶
func (s *SymbolGraphical) Column() string
func (*SymbolGraphical) HeaderLeft ¶
func (s *SymbolGraphical) HeaderLeft() string
func (*SymbolGraphical) HeaderMid ¶
func (s *SymbolGraphical) HeaderMid() string
func (*SymbolGraphical) HeaderRight ¶
func (s *SymbolGraphical) HeaderRight() string
func (*SymbolGraphical) MidLeft ¶
func (s *SymbolGraphical) MidLeft() string
func (*SymbolGraphical) MidRight ¶
func (s *SymbolGraphical) MidRight() string
func (*SymbolGraphical) Name ¶
func (s *SymbolGraphical) Name() string
SymbolGraphical symbol methods
func (*SymbolGraphical) Row ¶
func (s *SymbolGraphical) Row() string
func (*SymbolGraphical) TopLeft ¶
func (s *SymbolGraphical) TopLeft() string
func (*SymbolGraphical) TopMid ¶
func (s *SymbolGraphical) TopMid() string
func (*SymbolGraphical) TopRight ¶
func (s *SymbolGraphical) TopRight() string
type SymbolMarkdown ¶
type SymbolMarkdown struct{}
SymbolMarkdown provides symbols for SymbolMarkdown-style tables
func (*SymbolMarkdown) BottomLeft ¶
func (s *SymbolMarkdown) BottomLeft() string
func (*SymbolMarkdown) BottomMid ¶
func (s *SymbolMarkdown) BottomMid() string
func (*SymbolMarkdown) BottomRight ¶
func (s *SymbolMarkdown) BottomRight() string
func (*SymbolMarkdown) Center ¶
func (s *SymbolMarkdown) Center() string
func (*SymbolMarkdown) Column ¶
func (s *SymbolMarkdown) Column() string
func (*SymbolMarkdown) HeaderLeft ¶
func (s *SymbolMarkdown) HeaderLeft() string
func (*SymbolMarkdown) HeaderMid ¶
func (s *SymbolMarkdown) HeaderMid() string
func (*SymbolMarkdown) HeaderRight ¶
func (s *SymbolMarkdown) HeaderRight() string
func (*SymbolMarkdown) MidLeft ¶
func (s *SymbolMarkdown) MidLeft() string
func (*SymbolMarkdown) MidRight ¶
func (s *SymbolMarkdown) MidRight() string
func (*SymbolMarkdown) Row ¶
func (s *SymbolMarkdown) Row() string
func (*SymbolMarkdown) TopLeft ¶
func (s *SymbolMarkdown) TopLeft() string
func (*SymbolMarkdown) TopMid ¶
func (s *SymbolMarkdown) TopMid() string
func (*SymbolMarkdown) TopRight ¶
func (s *SymbolMarkdown) TopRight() string
type SymbolMerger ¶
type SymbolMerger struct {
// contains filtered or unexported fields
}
SymbolMerger provides custom symbols for merged table rendering
func (*SymbolMerger) BottomLeft ¶
func (s *SymbolMerger) BottomLeft() string
func (*SymbolMerger) BottomMid ¶
func (s *SymbolMerger) BottomMid() string
func (*SymbolMerger) BottomRight ¶
func (s *SymbolMerger) BottomRight() string
func (*SymbolMerger) Center ¶
func (s *SymbolMerger) Center() string
func (*SymbolMerger) Column ¶
func (s *SymbolMerger) Column() string
func (*SymbolMerger) HeaderLeft ¶
func (s *SymbolMerger) HeaderLeft() string
func (*SymbolMerger) HeaderMid ¶
func (s *SymbolMerger) HeaderMid() string
func (*SymbolMerger) HeaderRight ¶
func (s *SymbolMerger) HeaderRight() string
func (*SymbolMerger) MidLeft ¶
func (s *SymbolMerger) MidLeft() string
func (*SymbolMerger) MidRight ¶
func (s *SymbolMerger) MidRight() string
func (*SymbolMerger) Row ¶
func (s *SymbolMerger) Row() string
func (*SymbolMerger) TopLeft ¶
func (s *SymbolMerger) TopLeft() string
func (*SymbolMerger) TopMid ¶
func (s *SymbolMerger) TopMid() string
func (*SymbolMerger) TopRight ¶
func (s *SymbolMerger) TopRight() string
type SymbolNothing ¶
type SymbolNothing struct{}
SymbolNothing provides no border symbols (invisible borders)
func (*SymbolNothing) BottomLeft ¶
func (s *SymbolNothing) BottomLeft() string
func (*SymbolNothing) BottomMid ¶
func (s *SymbolNothing) BottomMid() string
func (*SymbolNothing) BottomRight ¶
func (s *SymbolNothing) BottomRight() string
func (*SymbolNothing) Center ¶
func (s *SymbolNothing) Center() string
func (*SymbolNothing) Column ¶
func (s *SymbolNothing) Column() string
func (*SymbolNothing) HeaderLeft ¶
func (s *SymbolNothing) HeaderLeft() string
func (*SymbolNothing) HeaderMid ¶
func (s *SymbolNothing) HeaderMid() string
func (*SymbolNothing) HeaderRight ¶
func (s *SymbolNothing) HeaderRight() string
func (*SymbolNothing) MidLeft ¶
func (s *SymbolNothing) MidLeft() string
func (*SymbolNothing) MidRight ¶
func (s *SymbolNothing) MidRight() string
func (*SymbolNothing) Row ¶
func (s *SymbolNothing) Row() string
func (*SymbolNothing) TopLeft ¶
func (s *SymbolNothing) TopLeft() string
func (*SymbolNothing) TopMid ¶
func (s *SymbolNothing) TopMid() string
func (*SymbolNothing) TopRight ¶
func (s *SymbolNothing) TopRight() string
type SymbolUnicode ¶
type SymbolUnicode struct {
// contains filtered or unexported fields
}
SymbolUnicode provides configurable SymbolUnicode border symbols
func (*SymbolUnicode) BottomLeft ¶
func (s *SymbolUnicode) BottomLeft() string
func (*SymbolUnicode) BottomMid ¶
func (s *SymbolUnicode) BottomMid() string
func (*SymbolUnicode) BottomRight ¶
func (s *SymbolUnicode) BottomRight() string
func (*SymbolUnicode) Center ¶
func (s *SymbolUnicode) Center() string
func (*SymbolUnicode) Column ¶
func (s *SymbolUnicode) Column() string
func (*SymbolUnicode) HeaderLeft ¶
func (s *SymbolUnicode) HeaderLeft() string
func (*SymbolUnicode) HeaderMid ¶
func (s *SymbolUnicode) HeaderMid() string
func (*SymbolUnicode) HeaderRight ¶
func (s *SymbolUnicode) HeaderRight() string
func (*SymbolUnicode) MidLeft ¶
func (s *SymbolUnicode) MidLeft() string
func (*SymbolUnicode) MidRight ¶
func (s *SymbolUnicode) MidRight() string
func (*SymbolUnicode) Row ¶
func (s *SymbolUnicode) Row() string
func (*SymbolUnicode) TopLeft ¶
func (s *SymbolUnicode) TopLeft() string
func (*SymbolUnicode) TopMid ¶
func (s *SymbolUnicode) TopMid() string
func (*SymbolUnicode) TopRight ¶
func (s *SymbolUnicode) TopRight() string
type Symbols ¶
type Symbols interface {
// Name returns the style name
Name() string
// Basic component symbols
Center() string // Junction symbol (where lines cross)
Row() string // Horizontal line symbol
Column() string // Vertical line symbol
// Corner and junction symbols
TopLeft() string // LevelHeader-left corner
TopMid() string // LevelHeader junction
TopRight() string // LevelHeader-right corner
MidLeft() string // Left junction
MidRight() string // Right junction
BottomLeft() string // LevelFooter-left corner
BottomMid() string // LevelFooter junction
BottomRight() string // LevelFooter-right corner
// Optional header-specific symbols
HeaderLeft() string
HeaderMid() string
HeaderRight() string
}
Symbols defines the interface for table border symbols
func NewSymbols ¶
func NewSymbols(style BorderStyle) Symbols
NewSymbols creates a new Symbols instance with the specified style