Best way to handle SQL driver with team?

agolangf · 2018-03-17 11:30:12 · 572 次点击    
这是一个分享于 2018-03-17 11:30:12 的资源,其中的信息可能已经有所发展或是发生改变。

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 (https://github.com/rana/ora).

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?

*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.

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.)


评论:

The_Sly_Marbo:

I know this doesn't really answer your question, but it seems that you'd be better off fixing the code sharing problem. If it's a pain to compile your library, something is seriously wrong.

teh_blacksmith:

My guess is that you could put rana/ora path in your project and include it without "github.com" 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't check the license to see if you can do that though.

sooon_mitch:

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't pull libraries from outside our VPN. So we can'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.

amapatzer:

I agree with /u/The_Sly_Marbo that you need to fix your code sharing problem, those are no conditions to be working under.

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.


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

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