英文:
What does "vendoring" mean in Go?
问题
在学习Go语言的依赖管理时,我经常听到“vendor”这个词被用作动词。例如:“你的应用程序所依赖的库被vendored了……”
在这个上下文中,"vendor a dependency"是什么意思?
例子:
"Dependencies that are vendored with your application"(与你的应用程序一起打包的依赖项)
来源:https://devcenter.heroku.com/articles/getting-started-with-go#declare-app-dependencies
"godep will write the vendored code"(godep将会生成vendored代码)
来源:https://github.com/tools/godep#go-15-vendor-experiment
后续问题:
-
这与Ruby中的"vendoring"有关吗?
-
这个术语在Go 1.5 Vendor Experiment中有完整的定义,还是有单独的传统定义?
英文:
When learning about Go's dependency management, I often hear the term "vendor" used as a verb. Example: "The dependencies that your application vendors..."
What does it mean to vendor a dependency in this context?
Examples:
> "Dependencies that are vendored with your application"
Source: https://devcenter.heroku.com/articles/getting-started-with-go#declare-app-dependencies
> "godep will write the vendored code"
Source: https://github.com/tools/godep#go-15-vendor-experiment
Follow-up questions:
-
Is this related to vendoring in Ruby?
-
Is this term fully defined in the Go 1.5 Vendor Experiment, or is there a separate conventional definition?
答案1
得分: 34
在Go语言中,这里定义了以下内容:
Vendoring是将第三方包的副本存储在项目中并保存在项目仓库中的行为。
我对Ruby一无所知。
基本上,你将一个包存储在自己的项目中,并使用该版本进行构建。我将其类比为构建网页时,将第三方的CSS或JS放在一个名为“vendors”的文件夹中。
英文:
Defined here for Go as:
> Vendoring is the act of making your own copy of the 3rd party packages
> your project is using. Those copies are traditionally placed inside
> each project and then saved in the project repository.
I don't know squirt about Ruby.
Essentially you're taking a package, storing it within your own project and using that version to build from. I liken it to how you might have a "vendors" folder where you put third party css or js when building a web page.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论