This is a solved problem with dep. Switch your Go projects to dep today.
This never works correctly for me and I have no idea why. I haven't written enough Go lately to get this sorted – but it's definitely not quite so obvious.
This is the journey of every Go programmer:*
There are steps after that though:
Oh, I guess I have to copy that code from before. No big deal.
Oh, right. I have to copy it again, with some changes? I guess that's okay.
Wait, did I fix this bug in the other copies too?
fire and burning pain.
No offense intended, but in those steps, I'd have probably lifted some of that work into a closure or other higher-level function. Go behaves a lot like a hybrid of functional and objective programming.
This never works correctly for me and I have no idea why. I haven't written enough Go lately to get this sorted – but it's definitely not quite so obvious.
This is the journey of every Go programmer:*
There are steps after that though: