英文:
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
。
例如:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论