Use the append() builtin
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.
Use the append() builtin
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.