Documentation ¶
Index ¶
- Constants
- func ErrorAtLeastOneColumn() error
- func ErrorHeaderMinWidthGreaterThanMaxWidth(headerTitle string, minWidth int, maxWidth int) error
- func ErrorHeaderWiderThanMaxWidth(headerTitle string, maxWidth int) error
- func ErrorWrongNumberOfColumns(rowNumber int, actualCols int, expectedCols int) error
- type Header
- type KeyValuePairOpts
- type KeyValuePairs
- type Opts
- type Table
Constants ¶
View Source
const ( ErrAtLeastOneColumn = "table.at_least_one_column" ErrHeaderWiderThanMaxWidth = "table.header_wider_than_max_width" ErrHeaderMinWidthGreaterThanMaxWidth = "table.header_min_width_greater_than_max_width" ErrWrongNumberOfColumns = "table.wrong_number_of_columns" )
Variables ¶
This section is empty.
Functions ¶
func ErrorAtLeastOneColumn ¶ added in v0.15.0
func ErrorAtLeastOneColumn() error
func ErrorHeaderMinWidthGreaterThanMaxWidth ¶ added in v0.15.0
func ErrorHeaderWiderThanMaxWidth ¶ added in v0.15.0
Types ¶
type KeyValuePairOpts ¶ added in v0.12.0
type KeyValuePairs ¶ added in v0.12.0
type KeyValuePairs struct {
// contains filtered or unexported fields
}
func (*KeyValuePairs) Add ¶ added in v0.12.0
func (kvs *KeyValuePairs) Add(key interface{}, value interface{})
func (*KeyValuePairs) AddAll ¶ added in v0.12.0
func (kvs *KeyValuePairs) AddAll(kvs2 KeyValuePairs)
func (KeyValuePairs) Print ¶ added in v0.12.0
func (kvs KeyValuePairs) Print(options ...*KeyValuePairOpts)
func (KeyValuePairs) String ¶ added in v0.12.0
func (kvs KeyValuePairs) String(options ...*KeyValuePairOpts) string
type Table ¶
type Table struct { Headers []Header Rows [][]interface{} Spacing int // Spacing between rows. If 0 is provided, it defaults to 3. }
func (*Table) FindHeaderByTitle ¶ added in v0.16.0
func (*Table) MustFormat ¶ added in v0.13.0
Return the error message as a string
Click to show internal directories.
Click to hide internal directories.