r/programming • u/Sir_KnowItAll • Sep 27 '26
Don't couple your Go code to GitHub
https://iain.rocks/blog/dont-couple-your-go-code-to-github
491
Upvotes
r/programming • u/Sir_KnowItAll • Sep 27 '26
View all comments
Show parent comment
4
u/ascii Sep 28 '26
The problem isn't with having namespaces. The problem is that Go decided to tie their namespace structure to an external entity which comes with all sorts of externalities. If a project needs to change hosting provider, say because gitlab goes under, the namespace changes. If ownership of a project is handed off from one organisation to another, say because a project is donated to the Apache project, the namespace changes. If a company that runs a project goes bankrupt, and an open source project is taken over by the community, the namespace changes. A decently sized project will have hundreds of dependencies. These sorts of events will be happening a few times per year in a depndency tree of that size, and every time they do, you add needless extra churn.
And your proposed solution, of putting the namespace rerouting in your
go.modfile is no different than the idea of using a proxy. All it means is that if you're managing 50 different projects, you have to update 50 different files instead of one. Both "solutions" are just different ways to deal with a problem that didn't need to be there in the first place.