govendor会自动包含传递依赖吗?

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

Does govendor automatically include transitive dependencies?

问题

假设我通过 govendor addgovendor fetch 添加了一个新的依赖项 X。这个依赖项 X 还依赖于 Y。

govendor 会自动拉取这些依赖项吗?还是我需要执行 govendor add Y

这个行为在 addfetch 之间有区别吗?

我在这里的任何文档中都找不到相关讨论:https://github.com/kardianos/govendor

或者通过运行 govendor add --help 也找不到相关信息。

英文:

Let's say I add a new dependency X through govendor add or govendor fetch. This dependency X has a dependency on Y.

Will govendor automatically pull in those dependencies as well? Or will I have to do govendor add Y.

Does the behavior differ betweeen add and fetch?

I couldn't find this discussed on any of the documentation here: https://github.com/kardianos/govendor

Or by running govendor add --help

答案1

得分: 6

govendor fetch <package_name>会自动包含传递依赖项。

govendor add <package_name>则不会。

但是,如果你运行govendor add +external(不带包名),它将为你的代码依赖的依赖项和传递依赖项提供供应商支持,只要它们在你的GOPATH上签出。

英文:

govendor fetch &lt;package_name&gt; will automatically include transitive dependencies.

govendor add &lt;package_name&gt; will not.

However if you run govendor add +external (with no package name) it will vendor the dependencies and transitive dependencies that your code relies on, as long as they are checked out on your GOPATH.

huangapple
  • 本文由 发表于 2016年12月15日 08:21:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/41154449.html
匿名

发表评论

匿名网友

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

确定