匿名结构
s2:=struct {
name string
age int
}{
name :"王二狗",
age :30,
}
fmt.Println(s2)
var aa map[int]struct {
name string
age int
}
aa = make( map[int]struct {
name string
age int
})
aaaa := struct{
name string
age int
}{
name:"aaa",
age:12,
}
aa[0] = aaaa
fmt.Print(aa)
或
aa := make( map[int]struct {
name string
age int
})
aaaa := struct{
name string
age int
}{
name:"aaa",
age:12,
}
aa[0] = aaaa
fmt.Print(aa)