Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/olekukonko/tablewriter
/ functions
Functions
889 in github.com/olekukonko/tablewriter
⨍
Functions
889
◇
Types & classes
130
↓ 240 callers
Method
String
this will be ignored since Format() is present
tests/fn.go:294
↓ 229 callers
Method
Append
Append adds data to the current row being built for the table. This method always contributes to a single logical row in the table. To add multiple di
tablewriter.go:181
↓ 159 callers
Function
NewTable
NewTable creates a new table instance with specified writer and options. Parameters include writer for output and optional configuration options. Retu
tablewriter.go:106
↓ 152 callers
Method
Render
Render triggers the table rendering process to the configured writer. No parameters are required. Returns an error if rendering fails.
tablewriter.go:532
↓ 137 callers
Method
Header
Header sets the table's header content, padding to match column count. Parameter elements is a slice of strings for header content. No return value. I
tablewriter.go:299
↓ 122 callers
Function
visualCheck
visualCheck compares rendered output against expected lines, reporting mismatches in a test. It normalizes line endings, strips ANSI colors, and trims
tests/fn.go:69
↓ 118 callers
Method
Debug
Debug retrieves the accumulated debug trace logs. No parameters are required. Returns a slice of debug messages including renderer logs.
tablewriter.go:291
↓ 115 callers
Method
Debug
Debug returns the renderer's debug trace. No parameters are required. Returns a slice of debug messages.
renderer/svg.go:381
↓ 110 callers
Method
Enabled
Public: Methods for State type Enabled checks if the state is on
tw/state.go:9
↓ 109 callers
Function
Width
Width calculates the visual width of a string using the global cache for performance. It excludes ANSI escape sequences and accounts for the global Ea
pkg/twwidth/width.go:329
↓ 104 callers
Function
WithRenderer
WithRenderer sets a custom renderer for the table and attaches the logger if present. Logs the change if debugging is enabled.
option.go:412
↓ 81 callers
Method
Get
(key K)
pkg/twcache/cache.go:10
↓ 71 callers
Method
Set
Set sets the value for the specified key. Does nothing if the map is nil.
tw/mapper.go:45
↓ 67 callers
Function
WithConfig
WithConfig applies a custom configuration to the table by merging it with the default configuration.
option.go:82
↓ 53 callers
Method
Apply
Apply applies the Tint's foreground and background colors to the given text, returning the text unchanged if no colors are set.
renderer/tint.go:16
↓ 53 callers
Function
NewMapper
NewMapper creates and returns a new initialized Mapper.
tw/mapper.go:19
↓ 52 callers
Function
NewBlueprint
NewBlueprint creates a new Blueprint instance with optional custom configurations.
renderer/blueprint.go:21
↓ 49 callers
Method
Reset
Reset clears the renderer's internal state. No parameters are required. No return value; prepares for new rendering.
renderer/svg.go:644
↓ 43 callers
Function
WithDebug
WithDebug enables or disables debug logging and adjusts the logger level accordingly. Logs the change if debugging is enabled.
option.go:90
↓ 40 callers
Function
getTestSectionDefaultConfig
Helper to get a fresh default CellConfig for a section. This uses the defaultConfig() function from the tablewriter package.
tablewriter_test.go:314
↓ 38 callers
Method
Contains
Contains returns true if the slice contains an element that satisfies the predicate.
tw/slicer.go:100
↓ 37 callers
Method
Column
Horizontal line symbol
tw/symbols.go:13
↓ 36 callers
Method
Add
(key K, value V)
pkg/twcache/cache.go:9
↓ 35 callers
Method
Bulk
Bulk adds multiple rows from a slice to the table. If Behavior.AutoHeader is enabled, no headers set, and rows is a slice of structs, automatically ex
tablewriter.go:235
↓ 32 callers
Method
Config
Renders separator line
tw/renderer.go:17
↓ 32 callers
Function
NewSymbols
NewSymbols creates a new Symbols instance with the specified style
tw/symbols.go:238
↓ 24 callers
Function
NewSymbolCustom
NewSymbolCustom creates a new customizable border style
tw/symbols.go:923
↓ 24 callers
Method
WithBottomLeft
(s string)
tw/symbols.go:958
↓ 24 callers
Method
WithBottomMid
(s string)
tw/symbols.go:959
↓ 24 callers
Method
WithBottomRight
(s string)
tw/symbols.go:960
↓ 24 callers
Method
WithCenter
Builder methods for fluent configuration
tw/symbols.go:950
↓ 24 callers
Method
WithColumn
(s string)
tw/symbols.go:952
↓ 24 callers
Method
WithMidLeft
(s string)
tw/symbols.go:956
↓ 24 callers
Method
WithMidRight
(s string)
tw/symbols.go:957
↓ 24 callers
Method
WithRow
(s string)
tw/symbols.go:951
↓ 24 callers
Method
WithTopLeft
(s string)
tw/symbols.go:953
↓ 24 callers
Method
WithTopMid
(s string)
tw/symbols.go:954
↓ 24 callers
Method
WithTopRight
(s string)
tw/symbols.go:955
↓ 23 callers
Function
WithStreaming
WithStreaming applies a streaming configuration to the table by merging it with the existing configuration. Logs the change if debugging is enabled.
option.go:460
↓ 22 callers
Method
Len
Len returns the number of elements in the map. Returns 0 if the map is nil.
tw/mapper.go:72
↓ 21 callers
Function
padLine
padLine pads a line to the specified column count by appending empty strings as needed.
option.go:981
↓ 20 callers
Method
Header
(headers [][]string, ctx Formatting)
tw/renderer.go:13
↓ 20 callers
Method
debug
debug logs a message if debugging is enabled. Parameters include format string and variadic arguments. No return value; appends to trace.
renderer/svg.go:685
↓ 18 callers
Method
Footer
Footer sets the table's footer content, padding to match column count. Parameter footers is a slice of strings for footer content. No return value. Fo
tablewriter.go:359
↓ 18 callers
Function
Truncate
Truncate shortens a string to fit within a specified visual width, optionally appending a suffix (e.g., "..."). It preserves ANSI escape sequences and
pkg/twwidth/width.go:165
↓ 17 callers
Method
Append
Append appends elements to the slice and returns the new slice.
tw/slicer.go:33
↓ 17 callers
Method
String
Age int will be ignore and string will be used
tests/bug_test.go:25
↓ 16 callers
Method
Close
Returns renderer config
tw/renderer.go:18
↓ 16 callers
Function
WithTrimSpace
WithTrimSpace sets whether leading and trailing spaces are automatically trimmed. Logs the change if debugging is enabled.
option.go:522
↓ 16 callers
Method
Write
Write implements the io.Writer interface, counting newlines in the input. It uses a pointer receiver to modify the internal count.
tw/types.go:236
↓ 15 callers
Method
Close
Close finalizes the table stream. It requires the stream to be started (by calling NewStreamTable). It calls the renderer's Close method to render fin
stream.go:14
↓ 15 callers
Method
Name
Name returns the style name
tw/symbols.go:8
↓ 15 callers
Function
NewHTML
NewHTML initializes an HTML renderer with the given w, debug setting, and optional configuration. It panics if the w is nil and applies defaults for u
renderer/html.go:44
↓ 15 callers
Method
Start
Start initializes the table stream. In this streaming model, renderer.Start() is primarily called in NewStreamTable. This method serves as a safeguard
stream.go:80
↓ 14 callers
Method
Trimmer
Trimmer trims whitespace from a string based on the Table’s configuration. It conditionally applies trimming based on TrimSpace and TrimTab settings.
tablewriter.go:566
↓ 13 callers
Method
Line
Renders table footer
tw/renderer.go:16
↓ 13 callers
Function
NewMarkdown
NewMarkdown initializes a Markdown renderer with defaults tailored for Markdown (e.g., pipes, header separator). Only the first config is used if mult
renderer/markdown.go:23
↓ 13 callers
Function
NewOcean
(oceanConfig ...OceanConfig)
renderer/ocean.go:29
↓ 13 callers
Method
buildAligns
buildAligns constructs a map of column alignments from configuration. Parameter config provides alignment settings for the section. Returns a map of c
tablewriter.go:617
↓ 13 callers
Method
buildPadding
buildPadding constructs a map of column padding settings from configuration. Parameter padding provides padding settings for the section. Returns a ma
tablewriter.go:659
↓ 13 callers
Function
visualCheckHTML
visualCheckHTML compares rendered HTML output against expected lines, trimming whitespace per line and ignoring blank lines.
tests/fn.go:134
↓ 12 callers
Method
Debug
debugLog appends a formatted message to the debug trace if debugging is enabled. func (h *HTML) debugLog(format string, a ...interface{}) { if h.debu
renderer/html.go:94
↓ 12 callers
Function
Max
Max returns the greater of two integers.
tw/fn.go:180
↓ 12 callers
Function
SetEastAsian
SetEastAsian enables or disables East Asian width handling globally. This function is thread-safe. Example: twdw.SetEastAsian(true) // Enable East
pkg/twwidth/width.go:128
↓ 12 callers
Method
Start
(w io.Writer)
tw/renderer.go:12
↓ 11 callers
Method
Each
Each iterates over each key-value pair in the map and calls the provided function. Does nothing if the map is nil.
tw/mapper.go:116
↓ 11 callers
Function
NewSVG
NewSVG creates a new SVG renderer with configuration. Parameter configs provides optional SVGConfig; defaults used if empty. Returns a configured SVG
renderer/svg.go:67
↓ 11 callers
Method
buildPaddingLineContents
buildPaddingLineContents constructs a padding line for a given section, respecting column widths and horizontal merges. It generates a []string where
zoo.go:586
↓ 10 callers
Method
Clone
Clone returns a shallow copy of the Mapper.
tw/mapper.go:143
↓ 10 callers
Method
Configure
Configure updates the table's configuration using a provided function. Parameter fn is a function that modifies the Config struct. Returns the Table i
tablewriter.go:274
↓ 10 callers
Function
PadRight
PadRight left-aligns a string within a specified width, filling remaining space on the right with padding.
tw/fn.go:61
↓ 10 callers
Method
Row
Junction symbol (where lines cross)
tw/symbols.go:12
↓ 10 callers
Function
createStreamTable
createStreamTable creates a TableStream with the renderer for testing.
tests/streamer_test.go:16
↓ 10 callers
Method
getMergeState
getMergeState retrieves the merge state for a specific column in a row, returning an empty state if not found.
renderer/junction.go:42
↓ 10 callers
Function
visualCheckCaption
visualCheckCaption (helper function, potentially shared or adapted from your existing visualCheck) Ensure this helper normalizes expected and got stri
tests/fn.go:220
↓ 10 callers
Function
visualCheckSVG
visualCheckSVG is the main comparison function
tests/svg_test.go:73
↓ 9 callers
Method
Caption
Caption sets the table caption (legacy method). Defaults to BottomCenter alignment, wrapping to table width. Use SetCaptionOptions for more control.
tablewriter.go:150
↓ 9 callers
Method
Paddable
Paddable reports whether this Padding configuration should override existing padding. Returns true if either: - Any padding string is non-empty (!p.Em
tw/types.go:224
↓ 9 callers
Function
WrapString
WrapString wraps s into a paragraph of lines of length lim, with minimal raggedness.
pkg/twwarp/wrap.go:51
↓ 9 callers
Method
buildCellContexts
buildCellContexts creates CellContext objects for a given line in batch mode. Parameters include ctx, mctx, hctx, aligns, and padding for rendering. R
zoo.go:523
↓ 9 callers
Function
defaultSVGConfigForTests
defaultSVGConfigForTests provides a consistent SVG config for tests. Parameter debug enables debug logging if true. Returns an SVGConfig struct with d
tests/svg_test.go:20
↓ 9 callers
Method
streamBuildCellContexts
streamBuildCellContexts creates CellContext objects for a given line in streaming mode. Parameters: - position: The section being processed (Header, R
stream.go:400
↓ 8 callers
Method
Build
Build returns the built Config
config.go:33
↓ 8 callers
Function
IsEastAsian
IsEastAsian returns the current East Asian width setting. This function is thread-safe. Example: if twdw.IsEastAsian() { // Handle East Asian wid
pkg/twwidth/width.go:103
↓ 8 callers
Function
NewColorized
NewColorized creates a Colorized renderer with the specified configuration, falling back to defaults if none provided. Only the first config is used i
renderer/colorized.go:38
↓ 8 callers
Method
SortedKeys
()
tw/mapper.go:163
↓ 8 callers
Method
convertCellsToStrings
convertCellsToStrings converts a row to its raw string representation using specified cell config for filters. 'rowInput' can be []string, []any, or a
zoo.go:1264
↓ 7 callers
Method
Debug
Debug returns the accumulated debug trace messages.
renderer/colorized.go:132
↓ 7 callers
Method
Format
()
tw/types.go:34
↓ 7 callers
Method
Len
Len returns the current number of items in the cache.
pkg/twcache/lru.go:187
↓ 7 callers
Method
OK
OK returns the value associated with the key and a boolean indicating whether the key exists.
tw/mapper.go:34
↓ 7 callers
Method
Purge
()
pkg/twcache/cache.go:11
↓ 7 callers
Method
RenderRight
RenderRight selects and colors the rightmost junction symbol for the row line based on position, merges, and last column index.
renderer/junction.go:100
↓ 7 callers
Function
WithAlignment
WithAlignment sets the default column alignment for the header, rows, and footer. Logs the change if debugging is enabled.
option.go:610
↓ 7 callers
Function
WithColumnWidths
WithColumnWidths sets per-column widths for the table. Negative widths are removed, and the change is logged if debugging is enabled.
option.go:67
↓ 7 callers
Method
prepareContent
prepareContent processes cell content with formatting and wrapping. Parameters include cells to process and config for formatting rules. Returns a sli
tablewriter.go:920
↓ 6 callers
Method
Center
Basic component symbols
tw/symbols.go:11
↓ 6 callers
Method
Footer
Renders a single row
tw/renderer.go:15
↓ 6 callers
Method
GetOrCompute
GetOrCompute retrieves a value or computes it if missing. Ensures no double computation under concurrency. Ideal for expensive computations like twwid
pkg/twcache/lru.go:62
↓ 6 callers
Method
RenderLeft
RenderLeft selects and colors the leftmost junction symbol for the current row line based on position and merges.
renderer/junction.go:68
next →
1–100 of 889, ranked by callers