这些结构之间的主要区别是什么?
type foo struct {
Name string `json:"name"`
}
和
type foo []struct {
Name string `json:"name"`
}
最佳答案
type foo1 struct {
Name string `json:"name"`
}
type foo2 []struct {
Name string `json:"name"`
}
简单理解为
type foo2 []foo1
关于go - `type foo struct` 和 `type foo []struct` 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53361099/