I have two structs:
type person struct {
name string
age int
}
type class struct {
students []person
}
Lets say that in the main function, I create and populate two person variables and then I want to add them to a variable with class type. How can I do it?
I.e.
s := person{name: "Sean", age: 50}
t := person{name: "Nicola", age: 35}
how I can put s and t into:
lab:=class
?