初始化结构体的成员变量
使用“键值对”初始化结构体
type Vertex struct {
x int
y int
}
v:=Vertex{3,4}type People struct {
name string
child *People
}
relation := &People{
name:"大明",
child: &People{
name: "小明",
child: &People{
name:"李华",
},
},
}初始化匿名结构体
最后更新于