tour: added missing word "methods"
Missing word "methods" in fourth paragraph of screen "Choosing a value or pointer receiver". Reads more clearly when what is being talked about is identified.
Fixes golang/tour#1352
Change-Id: I569f7ceed2e732c9e0485270828dcab387f86c71
GitHub-Last-Rev: b086ba8212
GitHub-Pull-Request: golang/website#197
Reviewed-on: https://go-review.googlesource.com/c/website/+/471315
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Родитель
70f9a532c4
Коммит
8bb4a56901
|
@ -131,7 +131,7 @@ The first is so that the method can modify the value that its receiver points to
|
|||
The second is to avoid copying the value on each method call.
|
||||
This can be more efficient if the receiver is a large struct, for example.
|
||||
|
||||
In this example, both `Scale` and `Abs` are with receiver type `*Vertex`,
|
||||
In this example, both `Scale` and `Abs` are methods with receiver type `*Vertex`,
|
||||
even though the `Abs` method needn't modify its receiver.
|
||||
|
||||
In general, all methods on a given type should have either value or pointer
|
||||
|
|
Загрузка…
Ссылка в новой задаче