分享
glide 的使用
中柠檬 · · 1550 次点击 · · 开始浏览这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。
go 1.5 开始支持直接从项目文件下的 vendor包中直接获取依赖(如果没有 vendor包,会在 GOPATH或 GOROOT目录下寻找是否有项目依赖),可以使用 glide工具生成 vendor包
注意:项目文件要按照规范放在 $GOPATH/src 目录或子目录下
使用方法:
cd <项目文件夹>
glide init
glide update
如果使用过程中,提示各种找不到 vcs,尝试输入以下代码
rm -rf ~/.glide
mkdir -p ~/.glide
glide mirror set https://golang.org/x/mobile https://github.com/golang/mobile --vcs git
glide mirror set https://golang.org/x/crypto https://github.com/golang/crypto --vcs git
glide mirror set https://golang.org/x/net https://github.com/golang/net --vcs git
glide mirror set https://golang.org/x/tools https://github.com/golang/tools --vcs git
glide mirror set https://golang.org/x/text https://github.com/golang/text --vcs git
glide mirror set https://golang.org/x/image https://github.com/golang/image --vcs git
glide mirror set https://golang.org/x/sys https://github.com/golang/sys --vcs git
有疑问加站长微信联系(非本文作者)
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
关注微信1550 次点击
上一篇:Golang直接操作共享内存
下一篇:流量拷贝-gor
添加一条新回复
(您需要 后才能回复 没有账号 ?)
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码` - 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传
收入到我管理的专栏 新建专栏
go 1.5 开始支持直接从项目文件下的 vendor包中直接获取依赖(如果没有 vendor包,会在 GOPATH或 GOROOT目录下寻找是否有项目依赖),可以使用 glide工具生成 vendor包
注意:项目文件要按照规范放在 $GOPATH/src 目录或子目录下
使用方法:
cd <项目文件夹>
glide init
glide update
如果使用过程中,提示各种找不到 vcs,尝试输入以下代码
rm -rf ~/.glide
mkdir -p ~/.glide
glide mirror set https://golang.org/x/mobile https://github.com/golang/mobile --vcs git
glide mirror set https://golang.org/x/crypto https://github.com/golang/crypto --vcs git
glide mirror set https://golang.org/x/net https://github.com/golang/net --vcs git
glide mirror set https://golang.org/x/tools https://github.com/golang/tools --vcs git
glide mirror set https://golang.org/x/text https://github.com/golang/text --vcs git
glide mirror set https://golang.org/x/image https://github.com/golang/image --vcs git
glide mirror set https://golang.org/x/sys https://github.com/golang/sys --vcs git