加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

去获取所有依赖项

发布时间:2020-12-14 04:57:06 所属栏目:百科 来源:网络整理
导读:我在 Windows 8.1 64位上使用go 1.5.1.我没有在我的环境中设置GO15VENDOREXPERIMENT.我安装了最新版本的git和bazaar. 我想获得gomniauth包: go get github.com/stretchr/gomniauth 即使该过程完成没有任何错误,也不会引入很多依赖项. 例如,在编译我的应用程
我在 Windows 8.1 64位上使用go 1.5.1.我没有在我的环境中设置GO15VENDOREXPERIMENT.我安装了最新版本的git和bazaar.

我想获得gomniauth包:

go get github.com/stretchr/gomniauth

即使该过程完成没有任何错误,也不会引入很多依赖项.

例如,在编译我的应用程序(取决于gomniauth)时,我收到以下错误:

..github.comstretchrcodecsxmlsimple_xml_codec.go:5:2: cannot find package "github.com/clbanning/x2j" in any of:
    C:Gosrcgithub.comclbanningx2j (from $GOROOT)
    C:worksrcgithub.comclbanningx2j (from $GOPATH)
..github.comstretchrcodecsmsgpackmsgpack_codec.go:6:2: cannot find package "github.com/ugorji/go/codec" in any of:
    C:Gosrcgithub.comugorjigocodec (from $GOROOT)
    C:worksrcgithub.comugorjigocodec (from $GOPATH)
..github.comstretchrcodecsbsonbson_codec.go:5:2: cannot find package "labix.org/v2/mgo/bson" in any of:
    C:Gosrclabix.orgv2mgobson (from $GOROOT)
    C:worksrclabix.orgv2mgobson (from $GOPATH)

它似乎引入了gomniauth的直接依赖关系,但并没有引入依赖关系的依赖关系.我已经从我的GOPATH / src以及GOPATH / pkg中删除了stretchr文件夹,但是在运行go go多次之后,它仍然没有拉出超出第二级的任何依赖项.

我100%确信我的网络问题没有问题.我可以使用我的浏览器或卷曲访问那些github repos.

解决方法

将目录更改为您的项目,然后尝试去获取./ …
例如.:

cd C:worksrcgithub.comstretchrgomniauth
go get ./...

或者只是去找github.com/stretchr/gomniauth / ……正如Amit Kumar Gupta建议的那样

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读