3 ms·
Lot of thanks to the author for this post. I have 2 questions: 1. How does one use a branch of a dependency in go.mod? (scenario: local dev where api & impl re
by tamalsaha001 8y ago
Lot of thanks to the author for this post. I have 2 questions:
1. How does one use a branch of a dependency in go.mod? (scenario: local dev where api & impl repos are separated)
2. How does one use branch from a fork in go.mod? (scenario: fixed bug in someone else's repo and now want to use my fork)
- ainar-g 8y ago1. IIRC you should be able to do go get example.com/repo@branch-1 2. Something like go mod edit -replace example.com/repo@version=example.com/fork@version It seems like the second command doesn't understand branches, so you'll need to specify a "pseudo-version" like "v0.0.0-20171125154426-754f7301a386". Or maybe my go1.11 is just out of date.