type Friend struct {
name string
age int
}
type Friends struct {
friends []Friend
}
I'd like to make Friends range-able, that means, if I have a variable my_friends with type Friends, I can loop though it with:
for i, friend := range my_friends {
// bla bla
}
is it possible in Go?