Advice on vendoring dependencies in Go

huangapple go评论91阅读模式
英文:

Advice on vendoring dependencies in Go

问题

我正在进行一个需要一些依赖的项目。关于依赖管理的最佳实践,我有些困惑。目前我正在使用GO15VENDOREXPERIMENT,并将依赖项复制到vendor目录中。

https://github.com/jeffellin/machine-cloudformation/tree/master/vendor/github.com

当我需要更新依赖项时,我手动从docker-machine检出源代码,并将其复制到我的vendor目录中。这会带来很多不必要的代码、测试等。有没有关于自动化这个过程的建议?我习惯了可以在配置文件中指定版本信息的maven。

那么GODEPS呢?它如何与GO15VENDOREXPERIMENT配合使用?我希望找到一种不需要将依赖项提交到源代码树中的解决方案。

英文:

I am working on a project that requires some dependencies. I am a little confused by the best practices regarding vendoring. Currently I am using GO15VENDOREXPERIMENT and have copied the dependencies into the vendor directory.

https://github.com/jeffellin/machine-cloudformation/tree/master/vendor/github.com

When I need to update the dependencies I checkout the source code manually from docker-machine and copy it into my vendor directory. This brings in a lot of unnecessary code, tests, etc. Is there any recommendations on automating this? I am used to maven where I can just specify version info in a configuration file.

What about GODEPS? How does that play into the GO15VENDOREXPERIMENT. I would prefer a solution where I don't have to checkin dependencies into my source tree.

答案1

得分: 0

有一些工具可以帮助管理你的依赖项。其中大多数工具都能够处理GO15VENDOREXPERIMENT

例如:

英文:

There are a few tools that help with vendoring your dependencies. Most of them are able to handle GO15VENDOREXPERIMENT.

For example:

huangapple
  • 本文由 发表于 2015年12月21日 02:55:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/34384595.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定