type A struct {
B []struct {
C string
D []struct {
E string
F []struct {
G string
}
}
}
}
Lets say I have an instance of struct A, and I want to append a struct D into it. I would try to do something like
var a A;
...
a.B.D = append(a.B.D, ???)
??? = A.B.D
--> type A has no method B
??? = D
--> undefined: D
--- Edit for more complete example ---
type A struct {
B []struct {
C string
D hugeNestedElement
}
}
var a A
// Goal is to create many B's
a = append(a, what_goes_here)
// or ...
a = append(a.B, what_goes_here)