Re:Learn Go: Hand-crafted Go exercises and examples
by bpizzi on Saturday May 16, 2020 @06:28PM
(#23207710)
You want a function that accepts a pointer when you want to modify an outside value within a function without returning the value. In that case, the func accepts a pointer (like in `func(p int)`) and you pass it either a pointer (a var declared as an {some_type}) or the address of a variable (with &variable).
[ Parent
| on HN ]
There are no comments on this comment yet.