Documentation
¶
Index ¶
- func FormatByDefault(v interface{}) string
- type Field
- func NewHidden(name string, jsonPropertyName string) *Field
- func NewHiddenWithToStringFunc(name string, jsonPropertyName string, toString ToStringFunc) *Field
- func NewVisible(name string, jsonPropertyName string) *Field
- func NewVisibleWithToStringFunc(name string, jsonPropertyName string, toString ToStringFunc) *Field
- func (f *Field) Format(value interface{}) interface{}
- func (f *Field) Hide()
- func (f *Field) IsVisible() bool
- func (f *Field) JsonPropertyName() string
- func (f *Field) Name() string
- func (f *Field) NameMatches(name string) bool
- func (f *Field) SetJsonPropertyName(newJsonPropertyName string)
- func (f *Field) Show()
- type ToStringFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Struct to represent a field in table output
func NewHiddenWithToStringFunc ¶
func NewHiddenWithToStringFunc(name string, jsonPropertyName string, toString ToStringFunc) *Field
Create new hidden Field struct with To String function
func NewVisible ¶
Create new visible Field struct
func NewVisibleWithToStringFunc ¶
func NewVisibleWithToStringFunc(name string, jsonPropertyName string, toString ToStringFunc) *Field
Create new visible Field struct with To String function
func (*Field) JsonPropertyName ¶
Get field's JSON property name
func (*Field) NameMatches ¶
Whether the field's name matches the given string (case-insensitive)
func (*Field) SetJsonPropertyName ¶
Modifiy a field's JSON property name
type ToStringFunc ¶
type ToStringFunc func(v interface{}) string
Click to show internal directories.
Click to hide internal directories.