3 ms·
Does Go take a copy or a reference?
by codemac 8y ago
Does Go take a copy or a reference?
- rhencke 8y agoThe following example will provide your answer: https://play.golang.org/p/NeGuDahW2yP https://play.golang.org/p/NeGuDahW2yP
- mikepurvis 8y agoThe captured context persists between calls to the function, as the sibling example demonstrates, or this one: https://play.golang.org/p/drfx_3g84aE https://play.golang.org/p/drfx_3g84aE