You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You aren't waiting for the goroutine to complete. Your program starts the goroutines and then immediately returns from main and exits before the goroutines have a chance to do anything. You need to use a sync.WaitGroup or some other synchronization mechanism to let the goroutines complete before you return from main.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8
What operating system and processor architecture are you using (
go env
)?What did you do?
is printing nothing
while whitout the goroutine it is
What did you expect to see?
I expect to see printed "Hello World"
What did you see instead?
I don't see anything
The text was updated successfully, but these errors were encountered: