go协和请求一个网址

package main
import (
"fmt"
"net/http"
"sync"
)
const (
url="https://crm.jinyingjie.com/index.php?m=api&a=dealSynchronizationData"
numReqs=3000
)
func main() {
varwgsync.WaitGroup
wg.Add(numReqs)
fori:=0; i<numReqs; i++ {
gofunc() {
deferwg.Done()
resp, err:=http.Get(url)
iferr!=nil {
fmt.Println("Error:", err)
return
}
deferresp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}()
}
wg.Wait()
}