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 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
- ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
- ¥20 腾讯企业邮箱邮件可以恢复么
- ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
- ¥15 错误 LNK2001 无法解析的外部符号
- ¥50 安装pyaudiokits失败
- ¥15 计组这些题应该咋做呀
- ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
- ¥15 让node服务器有自动加载文件的功能
- ¥15 jmeter脚本回放有的是对的有的是错的