简体   繁体   中英

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.

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM