type person struct { Name string Ageint}func main() a := person //声明的时候可以赋初始值,也可以不要 Name:"cpwl",: 21 a.Name= "roc"//改变值 fmt.Println(a)//{roc 21}}