首页 > 解决方案 > 如何在 dep golang 中使用分叉包?

问题描述

如何使用 dep 轻松使用自己的分叉包?

当我的更改被接受时,我希望能够再次使用上游。

标签: go

解决方案


虽然dep不再是这样做的首选方式,(从 go1.11 开始首选 go modules)

有了约束,这很容易,它仍然会在代码中的任何地方被引用并通过github.com/upstream/repo.

[[constraint]]
  name = "github.com/upstream/repo"
  branch = "forked-branch-name"
  source = "github.com/lexton/repo"

推荐阅读