govendor 使用

govendor是go语言依赖管理工具,推荐使用 https://github.com/kardianos/govendor 这个版本。

go get -u -v github.com/kardianos/govendor

不要将整个vendor/目录的内容都提到git仓库

我们只需要vendor/vendor.json这个一文件,其他都不需要!

我们只需要vendor/vendor.json这个一文件,其他都不需要!

我们只需要vendor/vendor.json这个一文件,其他都不需要!

重要的话说三遍。

 

当我们需要将代码同步的时候,只需要:

govendor sync -v

 更新vendor的包命令:

govendor update +vendor

 

posted @ 2019-10-08 19:54  salami_china  阅读(604)  评论(0编辑  收藏  举报