如何确保go build使用供应商目录中的所有依赖项
我已经使用了godep,并在vendor/目录中存储了我的所有依赖项。Go build也运行良好。然而,我如何才能确保我的所有依赖项都已出售 是否有任何命令可以确保这一点?我使用的CI服务让我知道。因为如果DEP不可用,我的测试构建将失败 无论如何,您都应该使用CI服务,然后您就可以免费获得该好处。我使用它来管理依赖项,它有一个状态选项。下面是Govendo的一些命令:如何确保go build使用供应商目录中的所有依赖项,go,dependencies,vendor,godeps,Go,Dependencies,Vendor,Godeps,我已经使用了godep,并在vendor/目录中存储了我的所有依赖项。Go build也运行良好。然而,我如何才能确保我的所有依赖项都已出售 是否有任何命令可以确保这一点?我使用的CI服务让我知道。因为如果DEP不可用,我的测试构建将失败 无论如何,您都应该使用CI服务,然后您就可以免费获得该好处。我使用它来管理依赖项,它有一个状态选项。下面是Govendo的一些命令: init Create the "vendor" folder and the "vendor.json" file.
init Create the "vendor" folder and the "vendor.json" file.
list List and filter existing dependencies and packages.
add Add packages from $GOPATH.
update Update packages from $GOPATH.
remove Remove packages from the vendor folder.
status Lists any packages missing, out-of-date, or modified locally.
fetch Add new or update vendor folder packages from remote repository.
sync Pull packages into vendor folder from remote repository with revisions
from vendor.json file.
migrate Move packages from a legacy tool to the vendor folder with metadata.
具体来说,您需要执行Govendo状态检查是否有丢失的包
如果您决定使用Govendo,您可以从以下步骤开始:
获取github.com/kardianos/govendo
Govendo迁移将从godeps迁移到Govendo
另外,您在一篇评论中提到,在部署到Heroky时,这里有一些切换到新的、干净的、空的GOPATH、git克隆和构建。非常简单。这是一种方式。我只是想问一下,是否有什么方法可以避免它,比如在go build命令中传递一个标志。我正在做一个小项目,这个项目部署在heroku上,github启用了自动部署。