原书出处
Go语言编程 完整版
Go语言的结构体只是很普通的复合类型,平淡无奇。例如,我们要定义一个矩形类型:
type Rect struct { x, y float64 width, height float64 } 然后我们定义成员方法Area()来计算矩形的面积: func (r *Rect) Area() float6
4 { return r.width * r.height } 可以看出, Go
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Go语言编程 完整版/_epub-src/text/part0000_split_001.html
EPUB SHA-256:81f5e4b37dc3bdb8c174f7ac04bf4df1eb84dbe1564b84b2299480108ce8b096