Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Describe ¶
func Describe(field reflect.StructField) string
Describe returns a description for a field It looks for a 'description' tag. If it is not found it returns a generic description.
func FieldNameJSON ¶
func FieldNameJSON(field reflect.StructField) (string, error)
FieldNameJSON resolves the name a field will have in JSON
func Flatten ¶
func Flatten(typ reflect.Type) []reflect.StructField
Flatten resolves the exported fields of a struct
Fields in embedded structs are recursively resolved and promoted to 'top-level'
func IsRequired ¶
func IsRequired(field reflect.StructField) bool
IsRequired checks whether a field is required or not.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.