It's very often I see .go files committed to pkg folder, like here https://github.com/kubernetes/apiserver what particular reason doing that vs using vendor folder for 3rdparty dependencies or commit your own code into src dir?
2条回答 默认 最新
- duanpie4763 2017-09-24 16:56关注
Please clarify further.
The
pkg
folder on that repo you linked is where they put the packages they wrote. Reason? well they need to put them somewhere, they chosepkg
.You use
vendor
folder when you don't want future changes to 3rd party packages you've used possibly make your program unstable, in that case you "vendor" those 3rd party packages. So you don't put your own packages invendor
folder for obvious reasons.Which
src
?$GOPATH/src
? you can do it! probably, I haven't test it. But you can only have one project in that case, and that's the project that you've placed there.
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 请教一下各位,为什么我这个没有实现模拟点击
- ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
- ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
- ¥20 有关区间dp的问题求解
- ¥15 多电路系统共用电源的串扰问题
- ¥15 slam rangenet++配置
- ¥15 有没有研究水声通信方面的帮我改俩matlab代码
- ¥15 ubuntu子系统密码忘记
- ¥15 保护模式-系统加载-段寄存器
- ¥15 电脑桌面设定一个区域禁止鼠标操作