3 ms·
You should open a channel, pass it to the go routine, and send a completion message from the goroutine, and then read from it before the end of main. 3 lines o
by Evbn 14y ago
You should open a channel, pass it to the go routine, and send a completion message from the goroutine, and then read from it before the end of main.
3 lines of code to show a cool festure and avoid an embarassing bug.