Documentation
¶
Overview ¶
Package lysmeta contains functions that analyze structs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasDbOrJsonTags ¶ added in v0.3.20
Types ¶
type Result ¶ added in v0.1.3
type Result struct {
DbTags []string // all combined "db" tags in the struct(s) passed
JsonTags []string // all combined "json" tags in the struct(s) passed, excluding "-"
JsonTagTypeMap map[string]reflect.Type // a map of [json tag]type
}
Result contains struct metadata
func AnalyzeStruct ¶ added in v0.3.20
AnalyzeStruct reflects the supplied struct and returns a Result. It recursively analyzes embedded and named structs if they have db or json tags. It checks for duplicate db and json tags across the entire struct hierarchy.
Click to show internal directories.
Click to hide internal directories.