Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/olekukonko/tablewriter
/ functions
Functions
889 in github.com/olekukonko/tablewriter
⨍
Functions
889
◇
Types & classes
130
↓ 6 callers
Function
WithHeaderConfig
WithHeaderConfig applies a full header configuration to the table. Logs the change if debugging is enabled.
option.go:387
↓ 6 callers
Function
WithRendition
WithRendition allows updating the active renderer's rendition configuration by merging the provided rendition. If the renderer does not implement tw.R
option.go:649
↓ 6 callers
Function
checkEqual
checkEqual compares two values and fails the test if they are not equal
pkg/twwarp/wrap_test.go:29
↓ 6 callers
Function
clamp
(w int)
pkg/twwidth/tab.go:251
↓ 6 callers
Method
convertToString
convertToString converts a value to its string representation.
zoo.go:1134
↓ 6 callers
Method
ensureInitialized
ensureInitialized initializes required fields before use. No parameters are required. No return value.
tablewriter.go:676
↓ 6 callers
Method
ensureStreamWidthsCalculated
ensureStreamWidthsCalculated ensures that stream widths and column count are initialized for streaming mode. It uses sampleData and sectionConfig to c
zoo.go:1429
↓ 5 callers
Method
BottomMid
LevelFooter-left corner
tw/symbols.go:22
↓ 5 callers
Method
Lines
Lines returns the total number of lines rendered. This method is only effective if the WithLineCounter() option was used during table initialization a
tablewriter.go:541
↓ 5 callers
Method
MidRight
Left junction
tw/symbols.go:20
↓ 5 callers
Function
NewConfigBuilder
NewConfigBuilder creates a new ConfigBuilder with defaults
config.go:26
↓ 5 callers
Method
Options
Options updates the table's Options using a provided function. Parameter opts is a function that modifies the Table struct. Returns the Table instance
tablewriter.go:410
↓ 5 callers
Function
PadLeft
PadLeft right-aligns a string within a specified width, filling remaining space on the left with padding.
tw/fn.go:72
↓ 5 callers
Method
String
String returns the string representation of the state
tw/state.go:42
↓ 5 callers
Method
Total
It must be a writer to be used in io.MultiWriter.
tw/types.go:41
↓ 5 callers
Method
Validate
Validate checks if the Align is one of the allowed values: None, Center, Left, or Right.
tw/types.go:48
↓ 5 callers
Function
checkLocale
checkLocale performs the string analysis on LANG/LC_ALL
pkg/twwidth/ea.go:278
↓ 5 callers
Method
convertToStringer
convertToStringer invokes the table's stringer function with optional caching.
zoo.go:1058
↓ 5 callers
Method
getColMaxWidths
getColMaxWidths retrieves maximum column widths for a section. Parameter position specifies the section (Header, Row, Footer). Returns a map of column
zoo.go:1451
↓ 5 callers
Method
maxColumns
maxColumns calculates the maximum column count across sections. No parameters are required. Returns the highest number of columns found.
tablewriter.go:813
↓ 5 callers
Method
prepareWithMerges
prepareWithMerges processes content and detects horizontal merges. Parameters include content, config, and position (Header, Row, Footer). Returns pro
tablewriter.go:1238
↓ 5 callers
Method
processVariadic
processVariadic handles the common logic for processing variadic arguments that could be either individual elements or a slice of elements
zoo.go:1573
↓ 5 callers
Method
renderPadding
renderPadding renders padding lines for a section. Parameters include ctx, mctx, hctx, and padChar for padding content. Returns an error if rendering
tablewriter.go:2153
↓ 4 callers
Method
Cap
Cap returns the maximum capacity of the cache.
pkg/twcache/lru.go:198
↓ 4 callers
Function
EastAsianDetect
EastAsianDetect checks the environment variables to determine if East Asian width calculations should be enabled.
pkg/twwidth/ea.go:147
↓ 4 callers
Method
HitRate
HitRate returns the cache hit ratio (0.0 to 1.0). Based on hits / (hits + misses).
pkg/twcache/lru.go:207
↓ 4 callers
Method
Logger
Gets Rendition form Blueprint
tw/renderer.go:19
↓ 4 callers
Method
MidLeft
LevelHeader-right corner
tw/symbols.go:19
↓ 4 callers
Function
NewCSVReader
NewCSVReader Start a New Table Writer with csv.Reader This enables customisation such as reader.Comma = ';' See http://golang.org/src/pkg/encoding/csv
csv.go:30
↓ 4 callers
Method
Renderer
Renderer retrieves the current renderer instance used by the table. No parameters are required. Returns the tw.Renderer interface instance.
tablewriter.go:805
↓ 4 callers
Method
Rendition
(r Rendition)
tw/renderer.go:33
↓ 4 callers
Function
TabWidth
TabWidth returns the detected global tab width.
pkg/twwidth/tab.go:275
↓ 4 callers
Function
WithPadding
WithPadding sets the global padding for the header, rows, and footer. Logs the change if debugging is enabled.
option.go:634
↓ 4 callers
Function
WithRowConfig
WithRowConfig applies a full row configuration to the table. Logs the change if debugging is enabled.
option.go:424
↓ 4 callers
Function
WithTrimTab
WithTrimTab sets whether leading and trailing tab characters are automatically trimmed. Logs the change if debugging is enabled.
option.go:533
↓ 4 callers
Method
calculateContentMaxWidth
calculateContentMaxWidth computes the maximum content width for a column, accounting for padding and mode-specific constraints. Returns the effective
zoo.go:973
↓ 4 callers
Method
closePreviousSection
closePreviousSection closes any open <tbody> or <tfoot> sections.
renderer/html.go:118
↓ 4 callers
Function
defaultConfig
defaultConfig returns a default Config with sensible settings for headers, rows, footers, and behavior.
option.go:733
↓ 4 callers
Function
isModernEnvironment
isModernEnvironment performs comprehensive checks for modern terminal capabilities.
pkg/twwidth/ea.go:287
↓ 4 callers
Function
mergeCellConfig
mergeCellConfig merges a source CellConfig into a destination CellConfig, prioritizing non-default source values. It handles deep merging for complex
option.go:807
↓ 4 callers
Method
moveToFront
moveToFront moves an entry to the front (MRU position).
pkg/twcache/lru.go:239
↓ 4 callers
Method
renderLine
renderLine renders a single line with callbacks and normalized widths. Parameters include ctx, mctx, hctx, aligns, and padding for rendering. Returns
tablewriter.go:2095
↓ 4 callers
Method
renderMarkdownLine
renderMarkdownLine renders a single Markdown line (header, row, footer, or separator) with pipes and alignment.
renderer/markdown.go:276
↓ 4 callers
Method
streamRenderedMergeState
streamRenderedMergeState converts the stored last rendered line content and its merge states into a map of CellContext, suitable for providing context
stream.go:1072
↓ 4 callers
Method
tryFinalizeWidths
(ctx tw.Formatting)
renderer/ocean.go:61
↓ 4 callers
Method
updateWidths
updateWidths updates the width map based on cell content and padding. Parameters include row content, widths map, and padding configuration. No return
zoo.go:1599
↓ 3 callers
Method
BottomRight
LevelFooter junction
tw/symbols.go:23
↓ 3 callers
Method
Disabled
Disabled checks if the state is off
tw/state.go:15
↓ 3 callers
Method
GetSegment
GetSegment determines whether to render a colored horizontal line or an empty space based on merge states.
renderer/junction.go:50
↓ 3 callers
Function
IsTab
IsTab returns true if r is a tab rune.
pkg/twwidth/tab.go:37
↓ 3 callers
Method
Len
Len returns the number of elements in the slice. Returns 0 if the slice is nil.
tw/slicer.go:44
↓ 3 callers
Function
NewJunction
NewJunction initializes a Junction with the given symbols, context, and tints. If debug is nil, a no-op debug function is used.
renderer/junction.go:30
↓ 3 callers
Method
RenderJunction
RenderJunction selects and colors the junction symbol between two adjacent columns based on merge states and table position.
renderer/junction.go:154
↓ 3 callers
Function
SplitWords
(s string)
pkg/twwarp/wrap.go:26
↓ 3 callers
Method
String
()
pkg/twwidth/tab.go:32
↓ 3 callers
Method
TopMid
LevelHeader-left corner
tw/symbols.go:17
↓ 3 callers
Method
TopRight
LevelHeader junction
tw/symbols.go:18
↓ 3 callers
Function
WidthWithOptions
WidthWithOptions calculates the visual width of a string with specific options, bypassing the global settings and cache. This is useful for one-shot c
pkg/twwidth/width.go:383
↓ 3 callers
Function
WithAutoHide
WithAutoHide enables or disables automatic hiding of columns with empty data rows. Logs the change if debugging is enabled.
option.go:17
↓ 3 callers
Function
WithFooterConfig
WithFooterConfig applies a full footer configuration to the table. Logs the change if debugging is enabled.
option.go:105
↓ 3 callers
Function
WithHeaderAutoFormat
WithHeaderAutoFormat enables or disables automatic formatting for header cells. Logs the change if debugging is enabled.
option.go:555
↓ 3 callers
Function
WithLineCounter
WithLineCounter enables the default line counter. A new instance of tw.LineCounter is added to the table's list of counters. The total count can be re
option.go:725
↓ 3 callers
Function
WithRowMaxWidth
WithRowMaxWidth sets the maximum content width for row cells. Negative values are ignored, and the change is logged if debugging is enabled.
option.go:446
↓ 3 callers
Function
WithTableMax
WithTableMax sets the maximum width of the entire table in characters. Negative values are ignored, and the change is logged if debugging is enabled.
deprecated.go:212
↓ 3 callers
Method
addToFront
addToFront adds an entry to the front of the list.
pkg/twcache/lru.go:248
↓ 3 callers
Method
buildCoreCellContexts
buildCoreCellContexts constructs CellContext objects for a single line, shared between batch and streaming modes. Parameters: - line: The content of t
zoo.go:561
↓ 3 callers
Function
calculateRunewidth
calculateRunewidth calculates the width of a single rune based on the provided options. It applies narrow overrides for box drawing characters if conf
pkg/twwidth/width.go:394
↓ 3 callers
Function
checkOverrides
checkOverrides looks for RUNEWIDTH_EASTASIAN
pkg/twwidth/ea.go:264
↓ 3 callers
Function
clean
clean ensures the first letter is capitalized and the rest are lowercase
tests/fn.go:304
↓ 3 callers
Function
envInt
(k string)
pkg/twwidth/tab.go:284
↓ 3 callers
Method
hasPerColumnBottomPadding
hasPerColumnBottomPadding checks for per-column bottom padding in footer. No parameters are required. Returns true if any per-column bottom padding is
tablewriter.go:783
↓ 3 callers
Function
mergeRendition
MergeRendition merges the 'override' rendition into the 'current' rendition. It only updates fields in 'current' if they are explicitly set (non-zero/
renderer/fn.go:203
↓ 3 callers
Function
mergeSettings
mergeSettings combines default and override settings, preserving defaults for unset (zero) overrides.
renderer/fn.go:163
↓ 3 callers
Method
removeNode
removeNode removes an entry from the linked list.
pkg/twcache/lru.go:262
↓ 3 callers
Method
removeOldest
removeOldest removes the tail entry (LRU). Calls onEvict if set and deletes from map.
pkg/twcache/lru.go:279
↓ 3 callers
Method
renderContentLine
(ctx tw.Formatting, lineData []string)
renderer/ocean.go:275
↓ 3 callers
Method
renderLine
renderLine renders a single line (header, row, or footer) with colors, handling merges and separators.
renderer/colorized.go:484
↓ 3 callers
Method
renderLine
renderLine renders a single line (header, row, or footer) with borders, separators, and merge handling.
renderer/blueprint.go:403
↓ 3 callers
Method
renderRowCell
renderRowCell generates HTML for a single cell, handling content escaping, merges, and alignment.
renderer/html.go:354
↓ 3 callers
Method
resetState
()
renderer/ocean.go:45
↓ 3 callers
Method
resolveAlignment
(ctx tw.Formatting)
renderer/markdown.go:134
↓ 3 callers
Method
storeVisualLine
storeVisualLine stores a visual line for rendering. Parameters include sectionIdx, lineData (cells), and ctx (formatting). No return value; buffers da
renderer/svg.go:695
↓ 2 callers
Method
ByColumnIndex
ByColumnIndex sets specific columns to be merged by their index. If not called, merging applies to all columns.
config.go:646
↓ 2 callers
Method
Column
()
tw/symbols.go:936
↓ 2 callers
Method
Column
()
tw/symbols.go:991
↓ 2 callers
Method
Config
Config returns the current table configuration. No parameters are required. Returns the Config struct with current settings.
tablewriter.go:267
↓ 2 callers
Method
Constrained
()
tw/cell.go:77
↓ 2 callers
Function
EastAsianForceLegacy
EastAsianForceLegacy forces the detection logic to ignore modern environment checks. It relies solely on Locale detection. This is useful for applicat
pkg/twwidth/ea.go:139
↓ 2 callers
Function
Filter
Filter compiles and returns a regular expression for matching ANSI escape sequences, including CSI (Control Sequence Introducer) and OSC (Operating Sy
pkg/twwidth/width.go:69
↓ 2 callers
Method
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.
tw/slicer.go:15
↓ 2 callers
Function
GetCacheStats
GetCacheStats returns current cache statistics
pkg/twwidth/width.go:85
↓ 2 callers
Method
Has
Has returns true if the key exists in the map, false otherwise.
tw/mapper.go:62
↓ 2 callers
Function
IsIsNumericOrSpace
IsIsNumericOrSpace checks if a rune is a digit or space character. Used in formatting logic to determine safe character replacements.
tw/fn.go:103
↓ 2 callers
Method
Keys
Keys returns a slice containing all keys in the map. Returns nil if the map is nil or empty.
tw/mapper.go:81
↓ 2 callers
Function
MakeAlign
(l int, align Align)
tw/fn.go:231
↓ 2 callers
Method
Merging
Merging returns a RowMergingBuilder for configuring cell merging.
config.go:360
↓ 2 callers
Function
NewLRUEvict
NewLRUEvict creates a new LRU cache with an eviction callback. The callback is optional and called on evictions. Returns nil if size <= 0.
pkg/twcache/lru.go:45
↓ 2 callers
Function
NewWriter
NewWriter creates a new table with default settings for backward compatibility. It logs the creation if debugging is enabled.
tablewriter.go:139
↓ 2 callers
Method
Remove
Remove deletes a key from the cache. Returns true if the key was found and removed.
pkg/twcache/lru.go:149
↓ 2 callers
Method
RemoveOldest
RemoveOldest removes and returns the least recently used item. Returns key, value, and true if an item was removed. Calls onEvict if set.
pkg/twcache/lru.go:220
← previous
next →
101–200 of 889, ranked by callers