Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StructIter ¶
type StructIter struct {
// contains filtered or unexported fields
}
StructIter is an iterator for ranging over a struct's fields with their values
func NewStructIter ¶
func NewStructIter(val reflect.Value) *StructIter
NewStructIter returns a new instance of StructIter for the specified value. It returns nil if v's Kind is not Struct.
func StructRange ¶
func StructRange(v interface{}) *StructIter
func (StructIter) Field ¶
func (it StructIter) Field() reflect.StructField
Field returns the struct field of the iterator's current entry.
func (*StructIter) Next ¶
func (it *StructIter) Next() bool
Next advances the iterator and reports whether there is another entry. It returns false when the iterator is exhausted; subsequent calls will panic.
func (StructIter) Value ¶
func (it StructIter) Value() reflect.Value
Value returns the value of the iterator's current entry.
Click to show internal directories.
Click to hide internal directories.