Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field interface { // Return the field name Name() string // Return the underlying type (dereferencing pointers) Type() reflect.Type // Return the index of the field Index() []int // Whether the field has a tag ie, Is("omitempty") Is(name string) bool // Return the tag value for a field Tag(name string) string // Return tuple value Tuple(name string) string // Return omit flag Omit() bool // Set omit flag SetOmit(bool) }
The field metadata
type Iterator ¶
type Iterator interface { // Return the number of elements Len() int // Return the next struct, or nil Next() any // Reset the iterator to the beginning Reset() }
Iterator is an interface for iterating over a slice of struct values
func NewIterator ¶
NewIterator returns a new slice iterator object, from a single struct value or an array of one or more struct values which are of the same type
type Struct ¶
type Struct interface { // Return the underlying type Type() reflect.Type // Return field metadata Fields() []Field // Return the field values in the correct order Values(v any) ([]any, error) }
The struct metadata
Click to show internal directories.
Click to hide internal directories.