Documentation ¶
Index ¶
Constants ¶
View Source
const ( TagName = "structfieldorder" OptionalTagValue = "optional" )
Variables ¶
This section is empty.
Functions ¶
func HasOptionalTag ¶
Types ¶
type StructField ¶
type StructFields ¶
type StructFields []*StructField
func NewStructFields ¶
func NewStructFields(strct *types.Struct) StructFields
NewStructFields creates a new StructFields from a given struct type. StructFields items are listed in order they appear in the struct.
func (StructFields) OrderedFields ¶
func (sf StructFields) OrderedFields(lit *ast.CompositeLit, onlyExported bool) (bool, StructFields)
OrderedFields returns true if the fields are the correct order otherwise false.
func (StructFields) String ¶
func (sf StructFields) String() (res string)
String returns a comma-separated list of field names.
Click to show internal directories.
Click to hide internal directories.