Suppose i have 2 structs :
type Base struct { id int name string } type Extended struct { Base Email string Password string }
And i want
Just check the Kind() of Value
if reflect.ValueOf(e).Field(i).Kind() != reflect.Struct { fmt.Println(reflect.ValueOf(e).Field(i)) }