doujingao6210 2019-07-18 23:03
浏览 9
已采纳

如何使“获得”在网络上而不是在计算机上显示

I"m trying to contribute for a project and the docs tell me to use this command

go get github.com/foo/bar 

but the error is

can't load package: package github.com/foo/bar: no Go files in /home/f/go/src/github.com/foo/bar

Obviously its looking on my computer but how do I make it so that it downloads from the web?

  • 写回答

1条回答 默认 最新

  • dongnanke4106 2019-07-18 23:32
    关注

    The problem is that the project you're trying to download cannot be built, because Go can't find any source files to build at the source path github.com/foo/bar. The package is, however, downloaded, and if you look in $GOPATH/src/github.com/foo/bar you will see the repository cloned there. So if you want just that, then you're done, but you can use go get -d in the future to avoid the error message.

    If you want something specific that can be imported, e.g. github.com/foo/bar/somepackage, then you should use go get github.com/foo/bar/somepackage.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测