Is there a way to create or sync Gokpkg.toml
with the packages that i import in my .go
files?
If my Gopkg.toml
is empty and I run dep ensure
, it would download all the packages that I import in my code to the vendor
folder but it won't update the Gopkg.toml
file.
It came up when I had to migrate a legacy project that didn't use a package manager to using dep
in the simplest way possible by just creating a Gopkg.toml
that contains the latest version of all the packages that I already import instead of running dep ensure -add ...
manually for every package.
Is there such command?
Go Dep-与供应商同步Gopkg.toml
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- douye2488 2018-08-09 04:55关注
Remove your
Gopkg.toml
file and just rundep init
and thendep ensure
. It will create yourGopkg.toml
file and automatically set all of the dependencies.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 js调用html页面需要隐藏某个按钮
- ¥15 ads仿真结果在圆图上是怎么读数的
- ¥20 Cotex M3的调试和程序执行方式是什么样的?
- ¥20 java项目连接sqlserver时报ssl相关错误
- ¥15 一道python难题3
- ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
- ¥15 牛顿斯科特系数表表示
- ¥15 arduino 步进电机
- ¥20 程序进入HardFault_Handler
- ¥15 oracle集群安装出bug