When I do this
done := make(chan bool)
for i := 0; i < 10; i++ {
go func() {
done <- true
}()
}
<-done
instead of this
done := make(chan bool)
for i := 0; i < 10; i++ {
go func() {
done <- true
}()
}
for i := 0; i < 10; i++ {
<-done
}
Am I leaking goroutines if I do not close them and Is there a tool to detect when I forget to close goroutines?