Documentation
¶
Index ¶
- Constants
- func KeyifyHeader(header string) string
- type ColumnSort
- type EmptyValue
- type Header
- type Section
- type Sorting
- type Table
- type Value
- type ValueBool
- type ValueBytes
- type ValueError
- type ValueFmt
- type ValueInt
- type ValueInterface
- type ValueNone
- type ValueString
- type ValueStrings
- type ValueSuffix
- type ValueTime
- type ValueVersion
- type Writer
Constants ¶
View Source
const UNKNOWN_HEADER_MAPPING rune = '_'
Variables ¶
This section is empty.
Functions ¶
func KeyifyHeader ¶
func KeyifyHeader(header string) string
Types ¶
type ColumnSort ¶
type ColumnSort struct {
Column int
Asc bool
}
type EmptyValue ¶
type EmptyValue struct{}
type Table ¶
type Table struct {
Title string
Content string
Header []Header
SortBy []ColumnSort
// Either sections or rows should be provided
Sections []Section
Rows [][]Value
Notes []string
// Formatting
HeaderFormatFunc func(string, ...interface{}) string
DataOnly bool
FillFirstColumn bool
BackgroundStr string
BorderStr string
Transpose bool
}
func (*Table) SetColumnVisibility ¶
func (t *Table) SetColumnVisibility(headers []Header) error
type ValueBool ¶
type ValueBool struct {
B bool
}
func NewValueBool ¶
func NewValueBool(b bool) ValueBool
type ValueBytes ¶
type ValueBytes struct {
I uint64
}
func NewValueBytes ¶
func NewValueBytes(i uint64) ValueBytes
func NewValueMegaBytes ¶ added in v0.0.53
func NewValueMegaBytes(i uint64) ValueBytes
type ValueError ¶
type ValueError struct {
E error
}
func NewValueError ¶
func NewValueError(e error) ValueError
type ValueFmt ¶
type ValueFmt struct {
V Value
Error bool
Func func(string, ...interface{}) string
}
func NewValueFmt ¶
func NewValueFmt(v Value, error bool) ValueFmt
type ValueInterface ¶
type ValueInterface struct {
I interface{}
}
func NewValueInterface ¶
func NewValueInterface(i interface{}) ValueInterface
type ValueString ¶
type ValueString struct {
S string
}
func NewValueString ¶
func NewValueString(s string) ValueString
type ValueStrings ¶
type ValueStrings struct {
S []string
}
func NewValueStrings ¶
func NewValueStrings(s []string) ValueStrings
type ValueSuffix ¶
type ValueSuffix struct {
V Value
Suffix string
}
func NewValueSuffix ¶
func NewValueSuffix(v Value, s string) ValueSuffix
type ValueTime ¶
type ValueTime struct {
T time.Time
}
func NewValueTime ¶
func NewValueTime(t time.Time) ValueTime
type ValueVersion ¶
type ValueVersion struct {
V semver.Version
}
func NewValueVersion ¶
func NewValueVersion(v semver.Version) ValueVersion
Click to show internal directories.
Click to hide internal directories.