type Persion struct{
name string//私有变量
age int}type Persion struct{
Name string//公有变量, 外界取值,必须大写
Age int}//方法:首字母大写func(p *Persion) GetName string{return p.Name
}
Go结构体中字段名必须大写字母开头type Persion struct{ name string //私有变量 age int }type Persion struct{ Name string //公有变量, 外界取值,必须大写 Age int}//方法:首字母大写func (p *Persion) GetName string{ return p.Name}...