3 ms·
You don't have to change the package name just because it's forked. I threw together an example of doing this with `dep`. I forked Fatih's color package, and a
by imsofuture 9y ago
You don't have to change the package name just because it's forked.
I threw together an example of doing this with `dep`. I forked Fatih's color package, and am using it as `github.com/fatih/color` no problem: https://github.com/sofuture/colortest https://github.com/sofuture/colortest (forked dep here: https://github.com/sofuture/color https://github.com/sofuture/color)
- alain_gilbert 9y agoAs I said in my other comment (https://news.ycombinator.com/item?id=15632049 https://news.ycombinator.com/item?id=15632049) It works for you because it's a small project and you are not actually importing other of your own packages inside it. But if you look at "echo", it import some other "echo" packages inside of it.
- imsofuture 9y agoThat doesn't matter is what I'm saying :) The package name of my fork isn't changed, and doesn't need to be, regardless of what else uses it. The only thing I had to do was specify 'use my fork's repo' in the Gopkg.toml file. Edit: I'll fork echo in my example and show you.
- imsofuture 9y agoOkay, updated my example with `echo`. Check it out: Using the original package name: https://github.com/sofuture/colortest/blob/master/main.go#L7 https://github.com/sofuture/colortest/blob/master/main.go#L7 I can refer to my fork: https://github.com/sofuture/colortest/blob/master/Gopkg.toml#L8-L11 https://github.com/sofuture/colortest/blob/master/Gopkg.toml...
- alain_gilbert 9y agoOh I see. Thank you for the example :)