© 1999-2048 dssz.net 粤ICP备11031372号
[其它] Go语言中结构体方法副本传参与指针传参的区别介绍
说明:GO语言结构体方法跟结构体指针方法的区别 首先,我定了三个接口、一个结构和三个方法: type DeptModeA interface { Name() string SetName(name string) } type DeptModeB interface { Relocate(building string, floor uint8) } type Dept struct { name string building string floor uint8 Key string } fu<weixin_38680308> 上传 | 大小:54kb