What is the main difference between these structs?
type foo struct {
Name string `json:"name"`
}
and
type foo []struct {
Name string `json:"name"`
}
type foo1 struct {
Name string `json:"name"`
}
type foo2 []struct {
Name string `json:"name"`
}
Simple understand as
type foo2 []foo1