Documentation ¶
Index ¶
- func GetFieldTag(field reflect.StructField) string
- func GetGtTags(model interface{}) map[string]gtTags
- func GetJsonTags(model interface{}) map[string]string
- func GetTags(model interface{}) (arr []string)
- func IsGtTagIgnore(tag reflect.StructTag) bool
- func IsTagIgnore(tag reflect.StructTag, tagName string, exist bool, extTags ...string) bool
- func ObtainMoreTags(ref reflect.Type, tagNames []string, fs ...func(reflect.StructTag) bool) map[string]map[string]string
- func ObtainTags(ref reflect.Type, tagName string, fs ...func(reflect.StructTag) bool) map[string]string
- func ParseGtTag(sTag reflect.StructTag) (tag, tagTable string, b bool)
- func ParseGtTags(ref reflect.Type, fs ...func(reflect.StructTag) bool) map[string]gtTags
- func ParseJsonTags(ref reflect.Type, fs ...func(reflect.StructTag) bool) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFieldTag ¶ added in v1.20.12
func GetFieldTag(field reflect.StructField) string
get json field tag if no, use HumpToLine
func GetGtTags ¶ added in v1.20.12
func GetGtTags(model interface{}) map[string]gtTags
gt:"-" gt:"ignore" gt:"sub_sql" gt:"excel:NAME" gt:"field:table.column" gt:"field:table.column;excel:NAME" GetGtTags use to analyze and obtain GT tags in the structure model
func GetJsonTags ¶ added in v1.20.12
GetJsonTags use to analyze and obtain JSON tags in the structure model, but it will ignore the ignored value of json
func IsGtTagIgnore ¶ added in v1.20.12
IsGtTagIgnore can determine gt-tags whether you do not need to parse
func IsTagIgnore ¶ added in v1.20.12
IsTagIgnore can determine tags whether you do not need to parse
func ObtainMoreTags ¶ added in v1.20.12
func ObtainMoreTags(ref reflect.Type, tagNames []string, fs ...func(reflect.StructTag) bool) map[string]map[string]string
ObtainTags use to get the specified tag in the structure fs use to filter specified tags, true means filtering
func ObtainTags ¶ added in v1.20.12
func ObtainTags(ref reflect.Type, tagName string, fs ...func(reflect.StructTag) bool) map[string]string
ObtainTags use to get the specified tag in the structure fs use to filter specified tags, true means filtering
func ParseGtTag ¶ added in v1.20.12
gt:"field:table.column"
func ParseGtTags ¶ added in v1.20.12
ParseGtTags use to get all gt tags
Types ¶
This section is empty.