这里以爬网页图片链接为例,再下载到本地到img文件下 package main import ( fmt io/ioutil net/http regexp strconv strings sync time ) var ( chanPageUrls chan string//数据通道chan waitGroup sync.WaitGroup chanTask chan string //监控chan ) const ( PageReg = `https?://[^]+?(\.((jpg)|(png)|(jpeg)|(gi