I have a goroutine running in a for loop:
func main(){
for _, i := range x{
go httpRequests(i, ch)
}
for i := range ch{
print i
}
}
func httpRequests(i, ch){
for _, x := range y{
go func(string x){
do something with i
ch <- result
}(x)
}
}
When I run that, it says all goroutines are asleep. Any suggestions?