go mod 替换不可用包

require(
  xxxxxxx    v0.0.0-incompatible
)


replace(
 xxxxx => xxxx 分支
)

以上文件中的 xxxxxx 代码仓库 修改为以上格式,然会使用replace 命令替换  仓库到分支,

使用go mod tidy 命令修复后会自动引用这个分支上合适的版本号

posted on 2023-04-10 17:31  running-fly  阅读(32)  评论(0编辑  收藏  举报

导航