github.com/qiuhoude/go-web@v0.0.0-20220223060959-ab545e78f20d/prepare/14_concurrent/futures/main.go (about) 1 package main 2 3 func main() { 4 5 //url := "http://www.baidu.com" 6 // 7 //resp, err := http.Get(url) 8 // 9 //if err != nil { 10 // panic(err) 11 //} 12 //defer resp.Body.Close() 13 // 14 //bodyBytes, err := ioutil.ReadAll(resp.Body) 15 16 }