Luke Exton
Luke Exton

Reputation: 3676

How to use forked packages with dep golang?

How can I use my own forked package easily using dep?

I would love to be able to use the upstream again when my changes are accepted.

Upvotes: 1

Views: 93

Answers (1)

Luke Exton
Luke Exton

Reputation: 3676

While dep is no longer the prefered way of doing this, (go modules preferred as of go1.11)

With constraints this is easy, it will still be referenced everywhere in code and resolved via github.com/upstream/repo.

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

Upvotes: 6

Related Questions