Skip to content

Commit

Permalink
fix translate of methods.go
Browse files Browse the repository at this point in the history
  • Loading branch information
hiwz committed Mar 31, 2020
1 parent 91b48c0 commit 5f30869
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/methods/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type rect struct {
width, height int
}

// 这里的 `area` 方法有一个 _接收者类型_:`rect`。
// 这里的 `area` 是一个拥有 `*rect` 类型接收器(receiver)的方法
func (r *rect) area() int {
return r.width * r.height
}
Expand Down

0 comments on commit 5f30869

Please sign in to comment.