09.2-sending-pointer-to-struct-over-channel

command
v0.0.0-...-9882766 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Test how to pass pointers to array via a channel, change it, and check if the change is reflected in the Go routine where the array was created.

Create an array with values within one Go routine, pass a pointer to that value on a channel. Pick it up from the channel in another Go routine, change it. Then print them all out in the first go routine to see if it was changed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL