我想使用“http”包,并尝试导入package mainimport ( "http")func main() { resp, err := http.Get("https://api.github.com/repos/otiai10/myFirstGo") if err != nil { // do something } if resp != nil { // do something }}并得到以下输出% go run httpget.go# command-line-arguments./httpget.go:4: imported and not used: "http"./httpget.go:8: undefined: http这是同样的问题吗?还是我以错误的方式使用了“导入”或“http”?
- 1 回答
- 0 关注
- 165 浏览
添加回答
举报
0/150
提交
取消