i don't understand the "vendor directory" feature

agolangf · · 356 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<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 &#34;p&#34; is interpreted as import &#34;d/vendor/p&#34; 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

356 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传