Best way to handle SQL driver with team?

agolangf · · 140 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I am currently working in a large team based project and I am currently working on a DB library specifically for our project. We are using Oracle and I have found a reliable Driver that works with Oracle (<a href="https://github.com/rana/ora" rel="nofollow">https://github.com/rana/ora</a>).</p> <p>My question: What is the best way to distribute this driver without having everyone compile it? I understand that we can use a binary file that has been compiled but what would be the best way to make it easy for everyone to install it? Is there a different way I can go about this?</p> <p>*Note: Our go get command does not work towards Github, (Some issue with our VPN), but it does work on our private repositories. Also has to be go version 1.8.3 compatible. </p> <p>TL;DR: What is the best way to include a DB driver (Rana/Ora) in our project without having everyone compile it. (Completely open to any suggestion/idea on how to do this better.)</p> <hr/>**评论:**<br/><br/>The_Sly_Marbo: <pre><p>I know this doesn&#39;t really answer your question, but it seems that you&#39;d be better off fixing the code sharing problem. If it&#39;s a pain to compile your library, something is seriously wrong.</p></pre>teh_blacksmith: <pre><p>My guess is that you could put rana/ora path in your project and include it without &#34;github.com&#34; prefix. That way you can include it in your git repository and have everyone get it from there as if a part of your project. I didn&#39;t check the license to see if you can do that though.</p></pre>sooon_mitch: <pre><p>I agree that you could do this but the issue is when we run go get from our private repo, it will pull the code down and all the libraries BUT it won&#39;t pull libraries from outside our VPN. So we can&#39;t go get the ora and expect it to pull every library, so we have to manually install the packages. Which is very tedious and a waste of time for the entire team. So we have one person do it by hand and make a binary and hand the binary out. We just need a better way to hand out this binary or something of the sort when we have to use our DB library. </p></pre>amapatzer: <pre><p>I agree with <a href="/u/The_Sly_Marbo" rel="nofollow">/u/The_Sly_Marbo</a> that you need to fix your code sharing problem, those are no conditions to be working under. </p> <p>That being said I would recommend that you use a package manager like dep or glide, lock the latest stable version of your dependency to the vendor directory and then commit your vendor directory to your repository. </p></pre>

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

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