I come from a C++ background and I\'m used to using the std::vector class for things like this. Lets assume I want a dynamic array of these:
std::vector
typ
Use the append() builtin
append()
Example:
type mytype struct { a, b int } func main() { a := []mytype{mytype{1, 2}, mytype{3, 4}} a = append(a, mytype{5, 6}) }
Refer to the spec for more info on append.