tag

package
v1.20.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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

func GetJsonTags(model interface{}) map[string]string

GetJsonTags use to analyze and obtain JSON tags in the structure model, but it will ignore the ignored value of json

func GetTags

func GetTags(model interface{}) (arr []string)

get struct model fields tag []string

func IsGtTagIgnore added in v1.20.12

func IsGtTagIgnore(tag reflect.StructTag) bool

IsGtTagIgnore can determine gt-tags whether you do not need to parse

func IsTagIgnore added in v1.20.12

func IsTagIgnore(tag reflect.StructTag, tagName string, exist bool, extTags ...string) bool

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

func ParseGtTag(sTag reflect.StructTag) (tag, tagTable string, b bool)

gt:"field:table.column"

func ParseGtTags added in v1.20.12

func ParseGtTags(ref reflect.Type, fs ...func(reflect.StructTag) bool) map[string]gtTags

ParseGtTags use to get all gt tags

func ParseJsonTags added in v1.20.12

func ParseJsonTags(ref reflect.Type, fs ...func(reflect.StructTag) bool) map[string]string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL