Re:Go Statement Considered Harmful (2018)
by mykowebhn on Friday March 19, 2021 @11:23AM
(#26514367)
Using a waitgroup will fix your problem in your example.
[ Parent
| on HN ]
Re:Go Statement Considered Harmful (2018)
by cratermoon on Friday March 19, 2021 @11:56AM
(#26514830)
Go convention would be to pass a 'done' channel to myFunc and only close the db on receipt of a message on the channel.