I am trying to make a web scraper using go. I built this code. It was built fine without any errors. But its binary won't execute.
Is this the problem with a large number of routines or those variables in the execute function?
package main
import (
"io/ioutil"
"net/http"
//"regexp"
)
func excuter(count int) {
adrr := string("http://torhit.com/torbite/?page=" + string(count))
resp, _ := http.Get(adrr)
bytes, _ := ioutil.ReadAll(resp.Body)
ioutil.WriteFile("scrap.txt"+string(count), bytes, 0777)
resp.Body.Close()
}
func main() {
//re := regexp.MustCompile("")
count := 1
maxcount := 200
for ; count <= maxcount; count++ {
go excuter(count)
}
}
package main
import (
"io/ioutil"
"net/http"
//"regexp"
)
func excuter(count int) {
adrr := string("http://torhit.com/torbite/?page=" + string(count))
resp, _ := http.Get(adrr)
bytes, _ := ioutil.ReadAll(resp.Body)
ioutil.WriteFile("scrap.txt"+string(count), bytes, 0777)
resp.Body.Close()
}
func main() {
//re := regexp.MustCompile("")
count := 1
maxcount := 200
for ; count <= maxcount; count++ {
go excuter(count)
}
}