statusCode, body, err := httpClient.Get(nil, fileUrl)
if err != nil {
log.Fatalf("error when download: %s", err)
}
the error is unexpected EOF sometime. But use wget or curl with the fileUrl is ok.
有疑问加站长微信联系(非本文作者)
![](https://static.golangjob.cn/static/img/footer.png?imageView2/2/w/280)
statusCode, body, err := httpClient.Get(nil, fileUrl)
if err != nil {
log.Fatalf("error when download: %s", err)
}
the error is unexpected EOF sometime. But use wget or curl with the fileUrl is ok.
有疑问加站长微信联系(非本文作者)
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
`单行代码`