dongsashe6006 2018-08-09 03:11
浏览 92
已采纳

Go Dep-与供应商同步Gopkg.toml

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?

  • 写回答

1条回答 默认 最新

  • douye2488 2018-08-09 04:55
    关注

    Remove your Gopkg.toml file and just run dep init and then dep ensure. It will create your Gopkg.toml file and automatically set all of the dependencies.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 依据报错在原代吗格式的基础上解决问题
  • ¥15 在虚拟机中安装flash code
  • ¥15 单片机stm32f10x编写光敏电阻调节3.3伏大功率灯亮度(光强越大灯越暗,白天正常光强灯不亮,使用ADC,PWM等模块)望各位找一下错误或者提供一个可实现功能的代码
  • ¥20 verilog状态机方法流水灯
  • ¥15 pandas代码实现不了意图
  • ¥15 GD32H7 从存储器到外设SPI传输数据无法重复启用DMA
  • ¥25 LT码在高斯信道下的误码率仿真
  • ¥45 渲染完成之后将物体的材质贴图改变,自动化进行这个操作
  • ¥15 yolov5目标检测并显示目标出现的时间或视频帧
  • ¥15 电视版的优酷可以设置电影连续播放吗?