<p>please explain the vendor directory feature which was mentioned here <a href="http://blog.golang.org/go1.6" rel="nofollow">http://blog.golang.org/go1.6</a> at the forth block<br/>
what is it? what is it used for?</p>
<hr/>**评论:**<br/><br/>rvxt: <pre><p>read this <a href="https://golang.org/s/go15vendor" rel="nofollow">https://golang.org/s/go15vendor</a></p>
<blockquote>
<p>If there is a source directory d/vendor, then, when compiling a source file within the subtree rooted at d, import "p" is interpreted as import "d/vendor/p" if that path names a directory containing at least one file with a name ending in “.go”.</p>
<p>When there are multiple possible resolutions, the most specific (longest) path wins.</p>
<p>The short form must always be used: no import path can contain “/vendor/” explicitly.</p>
<p>Import comments are ignored in vendored packages.</p>
</blockquote></pre>_cowl: <pre><p>Vendoring is using a local package (lib) instead of the online one when importing.
This is mainly done to use a specific version instead of the latest one
and especially to use a locally modified/patched version. </p></pre>kardianos: <pre><p>This might be useful:
<a href="https://blog.gopheracademy.com/advent-2015/vendor-folder/" rel="nofollow">https://blog.gopheracademy.com/advent-2015/vendor-folder/</a></p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传