我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何使用Go Mod供应商从GOPATH复制Deps?

How do I make go mod vendor copy dependencies from GOPATH instead of downloading them over the network?

There is no way to do this in general: modules are intentionally a separate workspace from GOPATH, and go mod vendor copies dependencies from the module workspace.

That said, if you can figure out what versions the various repos in your GOPATH are sync'd to, you can run go get -d <repo>@<version> within your module for each such repo to synchronize your module workspace to that version.

近期文章

  • 在函数中更改全局切片
  • 使用动态细分构建休假请求
  • 通过Cgo访问Aerospike C客户端时出错
  • 如何测试从AWS开发工具包找不到的结果?
  • 如何查看对在Heroku local中运行的Go应用程序所做的更改?
  • 无法通过负载均衡器传递查询IP
  • 命令'go install ckage'失败,退出代码为1
  • Golang管道SetReadDeadline首次读取后失败
  • 尝试将视频上传到youtube API时发生408超时错误
  • 如何在Golang中使用REST Api从第三方获取数据
  • Hyperledger Fabric使用Go SDK将交易存储在CouchDB中
  • [] struct {}和[] * struct {}有什么区别?
  • 上交所未注册
  • 无法安装Revel框架表格Go
  • 如何使用docker go-lang API的TaskLogs端点?
  • 进行例行泄漏修复
  • Golang中变量的范围
  • 需要将数据添加到CSV而不向数据添加逗号
  • 使用Golang和Gocqlx在Cassandra中进行多分区批处理
  • 为什么在Start()中关闭os / exec.StderrPipe的writer?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华