
Golang 圣经 - 习题
文章平均质量分 50
wfyeshi
这个作者很懒,什么都没留下…
展开
-
Go语言圣经 - 习题 - 1.6. 并发获取多个URL
package main import ( "fmt" "io" "io/ioutil" "net/http" "os" "strings" "time" ) type results struct { url string result string } func main() { start := time.Now() ch := make(chan str原创 2017-03-02 15:31:18 · 697 阅读 · 0 评论 -
Go语言圣经 - 习题 - 1.5. 获取URL
package main import ( "fmt" "io" "io/ioutil" "net/http" "os" "strings" ) func main() { for _, url := range os.Args[1:] { if !strings.HasPrefix(url, "http://") {原创 2017-03-02 11:36:54 · 1398 阅读 · 0 评论