Documentation ¶
Index ¶
- func Execute(pattern string, item interface{}) string
- func GetFieldFormatted(item interface{}, f FieldInfo) (interface{}, error)
- func GetFieldsFormatted(item interface{}, fs []FieldInfo) ([]interface{}, error)
- func GetFieldsFormattedForce(item interface{}, fs []FieldInfo) []interface{}
- type FieldInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
Execute takes a template string and an interface{} struct, substituting struct values for the variables. Field names can be nested.
func GetFieldFormatted ¶
func GetFieldsFormatted ¶
GetFieldsFormatted returns an interface{} slice for the struct and fields requested. An error is returned if any fields are not found or parsing options fail.
func GetFieldsFormattedForce ¶
func GetFieldsFormattedForce(item interface{}, fs []FieldInfo) []interface{}
GetFieldsFormattedForce returns an interface{} slice for the struct and fields requested. An empty string value is returned for anything that encounters an error.
Types ¶
Click to show internal directories.
Click to hide internal directories.