func GetFields(m interface{}) (ns []string) {
	typ := GetType(m)
	// Only structs are supported so return an empty result if the passed object
	// isn't a struct
	if typ.Kind() != reflect.Struct {
		fmt.Printf("%v type can't have attributes inspected\n", typ.Kind())
		return
	}
	// loop through the struct's fields
	for i := 0; i < typ.NumField(); i++ {
		f := typ.Field(i)
		if f.Anonymous {
			fkind := f.Type.Kind()
			if fkind == reflect.Struct || fkind == reflect.Ptr {
				fns := GetFields(reflect.New(f.Type).Interface())
				for _, fn := range fns {
					if String(fn).IsInArray(ns) {
						continue
					}
					ns = append(ns, fn)
				}
			}
		} else {
			if String(f.Name).IsInArray(ns) {
				continue
			}
			ns = append(ns, f.Name)
		}
	}
	return ns
}
// GetFields returns Fields Name Array, m could be pointer or struct.
// Emmber Struct call in rotate
GetFields returns Fields Name Array, m could be pointer or struct.
Emmber Struct call in rotate
// GetFields returns Fields Name Array m could be pointer or struct . // Emmber Struct call in rotate
func GetFields(m interface{}) (ns []string) {
	typ := GetType(m)
	if typ.Kind() != reflect.Struct {
		fmt.Printf("%v type can't have attributes inspected\n", typ.Kind())
		return
	}
	for i := 0; i < typ.NumField(); i++ {
		f := typ.Field(i)
		if f.Anonymous {
			fkind := f.Type.Kind()
			if fkind == reflect.Struct || fkind == reflect.Ptr {
				fns := GetFields(reflect.New(f.Type).Interface())
				for _, fn := range fns {
					if String(fn).IsInArray(ns) {
						continue
					}
					ns = append(ns, fn)
				}
			}
		} else {
			if String(f.Name).IsInArray(ns) {
				continue
			}
			ns = append(ns, f.Name)
		}
	}
	return ns
}
func GetFields ( m interface { } ) ( ns [ ] string ) { typ := GetType ( m ) if typ . Kind ( ) != reflect . Struct { fmt . Printf ( " \n " , typ . Kind ( ) ) return } for i := 0 ; i < typ . NumField ( ) ; i ++ { f := typ . Field ( i ) if f . Anonymous { fkind := f . Type . Kind ( ) if fkind == reflect . Struct || fkind == reflect . Ptr { fns := GetFields ( reflect . New ( f . Type ) . Interface ( ) ) for _ , fn := range fns { if String ( fn ) . IsInArray ( ns ) { continue } ns = append ( ns , fn ) } } } else { if String ( f . Name ) . IsInArray ( ns ) { continue } ns = append ( ns , f . Name ) } } return ns }
GetFields returns Fields Name Array, m could be pointer or struct.
GetFields returns Fields Name Array m could be pointer or struct .
// Only structs are supported so return an empty result if the passed object // isn't a struct // loop through the struct's fields