Documentation ¶
Index ¶
- Constants
- Variables
- type Format
- type Option
- func WithEmptyFieldPlaceholder(emptyFieldPlaceholder string) Option
- func WithEscape(has bool) Option
- func WithFormat(format Format) Option
- func WithHeader(has bool) Option
- func WithIgnoreFields(ignoreFields []int) Option
- func WithMargin(margin int) Option
- func WithMergeFields(mergeFields []int) Option
- func WithWordDelimiter(wordDelimiter string) Option
- type Table
Constants ¶
const ( DefaultEmptyFieldPlaceholder = "-" DefaultWordDelimiter = "\n" MarkdownDefaultEmptyFieldPlaceholder = "\\-" MarkdownDefaultWordDelimiter = "<br>" BacklogDefaultEmptyFieldPlaceholder = "-" BacklogDefaultWordDelimiter = "&br;" )
Default values for table rendering.
const Version = "0.0.43"
Variables ¶
var Formats = []string{
"text",
"compressed",
"markdown",
"backlog",
}
Formats holds the string representations of each format constant.
Functions ¶
This section is empty.
Types ¶
type Format ¶ added in v0.0.30
type Format int
Format defines the output format of the content.
type Option ¶
type Option func(*Table)
Option defines a type for functional options used to configure a Table.
func WithEmptyFieldPlaceholder ¶
WithEmptyFieldPlaceholder sets the placeholder for empty fields.
func WithEscape ¶ added in v0.0.34
WithEscape enables or disables escaping of field content.
func WithFormat ¶ added in v0.0.4
WithFormat sets the output format of the table.
func WithHeader ¶ added in v0.0.4
WithHeader configures the rendering of the table header.
func WithIgnoreFields ¶
WithIgnoreFields specifies columns to be ignored during rendering.
func WithMargin ¶ added in v0.0.34
WithMargin sets the margin size around cell content.
func WithMergeFields ¶
WithMergeFields specifies columns for merging based on their content.
func WithWordDelimiter ¶ added in v0.0.3
WithWordDelimiter sets the delimiter for splitting words in a field.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table represents a table structure for rendering data in a matrix format.