Documentation ¶
Overview ¶
Package formt defines utilities for formatting Struct field values
Index ¶
Constants ¶
View Source
const (
//TagName defines format tag name
TagName = "format"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Tag ¶
type Tag struct { Name string `tag:"name,omitempty"` //source for output name, is case formater is not defined, use Name otherwise use Name in UpperCamel format CaseFormat string `tag:"caseFormat,omitempty"` DateFormat string `tag:"dataFormat,omitempty"` TimeLayout string `tag:"timeLayout,omitempty"` Timezone string `tag:"timezone,omitempty"` FormatMask string `tag:"formatMask,omitempty"` //Nullable flag to output null value as opposed zero/empty value Nullable *bool `tag:"nullable,omitempty"` Inline bool `tag:"inline,omitempty"` Omitempty bool `tag:"omitempty,omitempty"` Ignore bool `tag:"ignore,omitempty"` //TBD Precision int `tag:"-"` Scale int `tag:"-"` Language string `tag:"-"` // contains filtered or unexported fields }
Tag defines format tag
func (*Tag) CaseFormatName ¶
func (t *Tag) CaseFormatName(defaultCaseFormat text.CaseFormat) string
CaseFormatName returns case formatted name
Click to show internal directories.
Click to hide internal directories.