// Fields returns the visitable fields of the struct.
Fields returns the visitable fields of the struct.
// Fields returns the visitable fields of the struct .
func (t namedStruct) Fields() []fieldInfo {
	ret := make([]fieldInfo, 0, t.NumFields())
	for a, j := 0, t.NumFields(); a < j; a++ {
		f := t.Field(a)
		if !f.Exported() {
			continue
		}
		if found, ok := t.v.visitableType(f.Type(), true); ok {
			ret = append(ret, fieldInfo{
				Name:   f.Name(),
				Parent: &t,
				Target: found,
			})
		}
	}
	return ret
}
func ( t namedStruct ) Fields ( ) [ ] fieldInfo { ret := make ( [ ] fieldInfo , 0 , t . NumFields ( ) ) for a , j := 0 , t . NumFields ( ) ; a < j ; a ++ { f := t . Field ( a ) if ! f . Exported ( ) { continue } if found , ok := t . v . visitableType ( f . Type ( ) , true ) ; ok { ret = append ( ret , fieldInfo { Name : f . Name ( ) , Parent : & t , Target : found , } ) } } return ret }
Fields returns the visitable fields of the struct.
Fields returns the visitable fields of the struct .
// Ignore un-exported fields. // Look up `field Something` to visitableType.