What does “vendoring” mean in Go?

谁说胖子不能爱 提交于 2019-11-30 01:15:00

问题


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:


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.



来源:https://stackoverflow.com/questions/35109393/what-does-vendoring-mean-in-go

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!