Use a local copy of a package with dep

agolangf · · 782 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I&#39;d like to be able to use a local copy of a package from GOPATH instead of importing it with dep, for local development.</p> <p>For builds, I&#39;d like to be able to pull the package as a vendored package.</p> <p>Is there a way to do this? I can&#39;t find it in the dep documentation.</p> <hr/>**评论:**<br/><br/>gcstang: <pre><p>it&#39;s not possible with dep, look at govendor instead</p></pre>agree-with-you: <pre><p>I agree, this does not seem possible.</p></pre>colek42: <pre><p>Delete the package from ./vendor/</p> <p>I am probably missing some details, but, the compiler looks in your gopath if it can&#39;t find a package in vendor. </p> <p>edit: spelling</p></pre>Secondsemblance: <pre><p>Not a great solution. My developers shouldn&#39;t have to hand delete something. Also my makefile runs dep a a dummy target</p></pre>wjkohnen: <pre><p>I have put a copy of a lib whose author chose to discontinue it on our internal GitLab and pointed dep to that &#34;mirror&#34;. I don&#39;t like it, but it works.</p></pre>


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:731990104

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