Process concurrent HTTP requests in Golang
<p>I'm trying to process a file which contains 200 URLs and use each URL to make an HTTP request. I need to process 10 URLs concurrently maximum each time (code should block until 10 URLs finish processing). Tried to solve it in go but I keep getting the whole file processed with 200 concurrent connection created.</p>

<pre><code>for scanner.Scan() { // loop through each url in the file
        // send each url to golang HTTPrequest
        go HTTPrequest(scanner.Text(), channel, &amp;wg)
}
fmt.Println(&lt;-channel)
wg.Wait()
</code></pre>

<p>What should i do?</p>