fix 10.6.3

修改语法错误
This commit is contained in:
smart
2016-01-21 17:00:02 +08:00
parent a0224fcdbe
commit 572ed6eeed

View File

@@ -238,9 +238,9 @@ func main() {
我们知道方法将指针作为接收者不是必须的,如下面的例子,我们只是需要 `Point3` 的值来做计算:
```go
type Point3 struct { x, y, z float }
type Point3 struct { x, y, z float64 }
// A method on Point3
func (p Point3) Abs float {
func (p Point3) Abs() float64 {
return math.Sqrt(p.x*p.x + p.y*p.y + p.z*p.z)
}
```