我想通过 raw.githubusercontent.com 在 github 中下载一些文件。
在使用golang实现这个功能的时候,遇到如下错误:
dial tcp: lookup raw.githubusercontent.com: getaddrinfow: The requested name is valid, but no data of the requested type was found.
我的代码:
url1 := "https://raw.githubusercontent.com/pupillord/tiny-cs/main/README.md"
// the error mentioned above will appear here
resp, err := http.Get(url1)
注意:如果我直接在网站上打开,我可以正常访问该文件。
慕码人8056858
相关分类