golang / tour

[mirror] A Tour of Go
BSD 3-Clause "New" or "Revised" License
1.53k stars 521 forks source link

tour: Pointers receivers #1592

Closed jhonpedro closed 2 months ago

jhonpedro commented 4 months ago

Context: https://go.dev/tour/methods/4

Try removing the * from the declaration of the Scale function on line 16 and observe how the program's behavior changes.

For me, it appears on line 17. That may be confusing for some people.

ALTree commented 2 months ago

You probably changed the code snippet. But it's on line 16 when the code has no changes.