MCPcopy Index your code

hub / github.com/olekukonko/tablewriter / functions

Functions889 in github.com/olekukonko/tablewriter

↓ 240 callersMethodString
this will be ignored since Format() is present
tests/fn.go:294
↓ 229 callersMethodAppend
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 callersFunctionNewTable
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 callersMethodRender
Render triggers the table rendering process to the configured writer. No parameters are required. Returns an error if rendering fails.
tablewriter.go:532
↓ 137 callersMethodHeader
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 callersFunctionvisualCheck
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 callersMethodDebug
Debug retrieves the accumulated debug trace logs. No parameters are required. Returns a slice of debug messages including renderer logs.
tablewriter.go:291
↓ 115 callersMethodDebug
Debug returns the renderer's debug trace. No parameters are required. Returns a slice of debug messages.
renderer/svg.go:381
↓ 110 callersMethodEnabled
Public: Methods for State type Enabled checks if the state is on
tw/state.go:9
↓ 109 callersFunctionWidth
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 callersFunctionWithRenderer
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 callersMethodGet
(key K)
pkg/twcache/cache.go:10
↓ 71 callersMethodSet
Set sets the value for the specified key. Does nothing if the map is nil.
tw/mapper.go:45
↓ 67 callersFunctionWithConfig
WithConfig applies a custom configuration to the table by merging it with the default configuration.
option.go:82
↓ 53 callersMethodApply
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 callersFunctionNewMapper
NewMapper creates and returns a new initialized Mapper.
tw/mapper.go:19
↓ 52 callersFunctionNewBlueprint
NewBlueprint creates a new Blueprint instance with optional custom configurations.
renderer/blueprint.go:21
↓ 49 callersMethodReset
Reset clears the renderer's internal state. No parameters are required. No return value; prepares for new rendering.
renderer/svg.go:644
↓ 43 callersFunctionWithDebug
WithDebug enables or disables debug logging and adjusts the logger level accordingly. Logs the change if debugging is enabled.
option.go:90
↓ 40 callersFunctiongetTestSectionDefaultConfig
Helper to get a fresh default CellConfig for a section. This uses the defaultConfig() function from the tablewriter package.
tablewriter_test.go:314
↓ 38 callersMethodContains
Contains returns true if the slice contains an element that satisfies the predicate.
tw/slicer.go:100
↓ 37 callersMethodColumn
Horizontal line symbol
tw/symbols.go:13
↓ 36 callersMethodAdd
(key K, value V)
pkg/twcache/cache.go:9
↓ 35 callersMethodBulk
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 callersMethodConfig
Renders separator line
tw/renderer.go:17
↓ 32 callersFunctionNewSymbols
NewSymbols creates a new Symbols instance with the specified style
tw/symbols.go:238
↓ 24 callersFunctionNewSymbolCustom
NewSymbolCustom creates a new customizable border style
tw/symbols.go:923
↓ 24 callersMethodWithBottomLeft
(s string)
tw/symbols.go:958
↓ 24 callersMethodWithBottomMid
(s string)
tw/symbols.go:959
↓ 24 callersMethodWithBottomRight
(s string)
tw/symbols.go:960
↓ 24 callersMethodWithCenter
Builder methods for fluent configuration
tw/symbols.go:950
↓ 24 callersMethodWithColumn
(s string)
tw/symbols.go:952
↓ 24 callersMethodWithMidLeft
(s string)
tw/symbols.go:956
↓ 24 callersMethodWithMidRight
(s string)
tw/symbols.go:957
↓ 24 callersMethodWithRow
(s string)
tw/symbols.go:951
↓ 24 callersMethodWithTopLeft
(s string)
tw/symbols.go:953
↓ 24 callersMethodWithTopMid
(s string)
tw/symbols.go:954
↓ 24 callersMethodWithTopRight
(s string)
tw/symbols.go:955
↓ 23 callersFunctionWithStreaming
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 callersMethodLen
Len returns the number of elements in the map. Returns 0 if the map is nil.
tw/mapper.go:72
↓ 21 callersFunctionpadLine
padLine pads a line to the specified column count by appending empty strings as needed.
option.go:981
↓ 20 callersMethodHeader
(headers [][]string, ctx Formatting)
tw/renderer.go:13
↓ 20 callersMethoddebug
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 callersMethodFooter
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 callersFunctionTruncate
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 callersMethodAppend
Append appends elements to the slice and returns the new slice.
tw/slicer.go:33
↓ 17 callersMethodString
Age int will be ignore and string will be used
tests/bug_test.go:25
↓ 16 callersMethodClose
Returns renderer config
tw/renderer.go:18
↓ 16 callersFunctionWithTrimSpace
WithTrimSpace sets whether leading and trailing spaces are automatically trimmed. Logs the change if debugging is enabled.
option.go:522
↓ 16 callersMethodWrite
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 callersMethodClose
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 callersMethodName
Name returns the style name
tw/symbols.go:8
↓ 15 callersFunctionNewHTML
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 callersMethodStart
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 callersMethodTrimmer
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 callersMethodLine
Renders table footer
tw/renderer.go:16
↓ 13 callersFunctionNewMarkdown
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 callersFunctionNewOcean
(oceanConfig ...OceanConfig)
renderer/ocean.go:29
↓ 13 callersMethodbuildAligns
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 callersMethodbuildPadding
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 callersFunctionvisualCheckHTML
visualCheckHTML compares rendered HTML output against expected lines, trimming whitespace per line and ignoring blank lines.
tests/fn.go:134
↓ 12 callersMethodDebug
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 callersFunctionMax
Max returns the greater of two integers.
tw/fn.go:180
↓ 12 callersFunctionSetEastAsian
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 callersMethodStart
(w io.Writer)
tw/renderer.go:12
↓ 11 callersMethodEach
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 callersFunctionNewSVG
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 callersMethodbuildPaddingLineContents
buildPaddingLineContents constructs a padding line for a given section, respecting column widths and horizontal merges. It generates a []string where
zoo.go:586
↓ 10 callersMethodClone
Clone returns a shallow copy of the Mapper.
tw/mapper.go:143
↓ 10 callersMethodConfigure
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 callersFunctionPadRight
PadRight left-aligns a string within a specified width, filling remaining space on the right with padding.
tw/fn.go:61
↓ 10 callersMethodRow
Junction symbol (where lines cross)
tw/symbols.go:12
↓ 10 callersFunctioncreateStreamTable
createStreamTable creates a TableStream with the renderer for testing.
tests/streamer_test.go:16
↓ 10 callersMethodgetMergeState
getMergeState retrieves the merge state for a specific column in a row, returning an empty state if not found.
renderer/junction.go:42
↓ 10 callersFunctionvisualCheckCaption
visualCheckCaption (helper function, potentially shared or adapted from your existing visualCheck) Ensure this helper normalizes expected and got stri
tests/fn.go:220
↓ 10 callersFunctionvisualCheckSVG
visualCheckSVG is the main comparison function
tests/svg_test.go:73
↓ 9 callersMethodCaption
Caption sets the table caption (legacy method). Defaults to BottomCenter alignment, wrapping to table width. Use SetCaptionOptions for more control.
tablewriter.go:150
↓ 9 callersMethodPaddable
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 callersFunctionWrapString
WrapString wraps s into a paragraph of lines of length lim, with minimal raggedness.
pkg/twwarp/wrap.go:51
↓ 9 callersMethodbuildCellContexts
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 callersFunctiondefaultSVGConfigForTests
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 callersMethodstreamBuildCellContexts
streamBuildCellContexts creates CellContext objects for a given line in streaming mode. Parameters: - position: The section being processed (Header, R
stream.go:400
↓ 8 callersMethodBuild
Build returns the built Config
config.go:33
↓ 8 callersFunctionIsEastAsian
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 callersFunctionNewColorized
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 callersMethodSortedKeys
()
tw/mapper.go:163
↓ 8 callersMethodconvertCellsToStrings
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 callersMethodDebug
Debug returns the accumulated debug trace messages.
renderer/colorized.go:132
↓ 7 callersMethodFormat
()
tw/types.go:34
↓ 7 callersMethodLen
Len returns the current number of items in the cache.
pkg/twcache/lru.go:187
↓ 7 callersMethodOK
OK returns the value associated with the key and a boolean indicating whether the key exists.
tw/mapper.go:34
↓ 7 callersMethodPurge
()
pkg/twcache/cache.go:11
↓ 7 callersMethodRenderRight
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 callersFunctionWithAlignment
WithAlignment sets the default column alignment for the header, rows, and footer. Logs the change if debugging is enabled.
option.go:610
↓ 7 callersFunctionWithColumnWidths
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 callersMethodprepareContent
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 callersMethodCenter
Basic component symbols
tw/symbols.go:11
↓ 6 callersMethodFooter
Renders a single row
tw/renderer.go:15
↓ 6 callersMethodGetOrCompute
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 callersMethodRenderLeft
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