Don't couple your Go code to GitHub
A Go blog argues developers should use custom domains so module imports are not locked to GitHub.
A Go developer argues that import paths such as github.com/user/repo couple libraries to one host, so moving to GitLab or another forge requires widespread code changes. The suggested fix is a custom domain served with go-import and go-source meta tags, letting the Go tool follow a new repository location without changing imports. The author says one company kept paying for GitHub, GitLab, and Azure DevOps because migrating module paths was too expensive, and describes an nginx-and-HTML setup plus a replication tool called Boneclone.
- Go import paths tied to GitHub force code changes if hosting moves.
- Custom domains with go-import meta tags let teams retarget repos without breaking imports.
- One company paid for GitHub, GitLab, and Azure DevOps because migration was too costly.
- Products
- Go
From the original article
2 min read at iain.rocksSep 27, 2026 One of the good features of Go is that you namespace your code with the location to fetch the code. This means if you host your Go code at http://github. com/thetrueares/boneclone then you have the line import “github.
By birdculture · iain.rocks
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.