AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Buying for a business?Offer from Amazon

Get business pricing on monitors, keyboards and dev gear

  • Business-only prices and quantity discounts
  • Tax-exempt purchasing
  • Multiple users, one account, clear invoices
As an affiliate, we earn on qualifying purchases.

A September 2026 blog post by developer Iain Cambridge argues Go projects should not use GitHub (or other git host) URLs as import paths, because moving hosting providers then forces code changes. He recommends vanity import domains like go.uber.org and shares Nginx and HTML configs for setting one up.

Developer Iain Cambridge published a blog post on September 27, 2026 arguing that Go programmers should stop using GitHub URLs as their package import paths and instead run their own vanity import domains such as go.iain.rocks. His core claim: naming packages after a git host couples every import statement in the ecosystem to that host, making it expensive or impractical to ever switch providers.

Cambridge explains that Go namespaces code by its fetch location: a module hosted at github.com/thetrueares/boneclone is imported as import “github.com/thetrueares/boneclone”, and the Go toolchain fetches it via git. He credits this design with making it easy to distribute Go libraries without a centralised package registry and easy to find where to report bugs. The downside, he writes, is that the hosting location becomes part of the package’s identity.

The consequence, according to the post, is lock-in: if a project moves from GitHub to GitLab, every consumer’s import path changes, and code that keeps the old path fetches the old version. Cambridge says this is effectively the default practice in the Go community — “something that is pretty much defacto” — despite how restrictive it is.

He cites a first-hand example: a company he observed ended up running GitLab, GitHub, and Azure DevOps simultaneously because migrating code locations was judged too costly, paying for three hosting services at once. He says this experience motivated his tool Boneclone, which replicates skeleton code across multiple git hosts. His proposed fix is a vanity domain — for example go.uber.org or go.mongodb.org, both real-world precedents — with a go-import meta tag redirecting the Go tool to the actual repository. Moving hosts then requires only changing the redirect, not any user code.

At a glance
reportWhen: published September 27, 2026
The developmentDeveloper Iain Cambridge published a technical argument and configuration guide on September 27, 2026, urging Go developers to decouple import paths from GitHub via custom vanity domains.

Lock-in Costs for Commercial Go Teams

Import paths are baked into every file that uses a package, so a host migration under the default scheme touches potentially thousands of imports across an organisation and its downstream users. Cambridge argues this creates a vendor lock-in problem with direct financial consequences — his anecdotal company paid for three hosting platforms rather than consolidate. For commercial Go teams, he recommends vanity domains for internal libraries as a low-cost way to keep hosting decisions reversible. The post also serves as a practical how-to: Cambridge includes a complete Nginx configuration that permanently redirects human visitors to the repository while serving the go-import meta tag to the Go tool (distinguished by the ?go-get=1 query parameter), plus the required HTML file.

How Go Imports and Vanity Domains Work

Go’s module system derives import paths from fetch locations, which removes the need for a central registry but embeds the host URL in the language-level identity of a package. The go-import meta tag mechanism lets any domain declare where a module’s git repository actually lives; this is how established projects such as go.uber.org and go.mongodb.org already operate. Notably, moving hosting under a vanity domain is transparent to consumers — the install command and import statements remain unchanged, as Cambridge illustrates with go.iain.rocks/boneclone pointing at a GitHub repository.

“If you move your git hosting to GitLab then you have to change your code! Otherwise, you’ll be fetching the old version.”

— Iain Cambridge, blog post

Adoption Prospects for Vanity Imports

Developers can implement the approach immediately using the Nginx and HTML configurations Cambridge published alongside the post. Whether the practice spreads beyond large, high-profile projects is unclear; broader adoption would depend on teams weighing the setup and maintenance cost of a vanity domain against the risk of a future hosting migration. Cambridge’s own tool, Boneclone, is positioned as a companion solution for replicating code across multiple git hosts simultaneously.

Key Questions

Why does using a GitHub URL in a Go import path cause problems?

Because the import path is part of the package’s identity. If the code moves to another host, every import statement referencing the old GitHub URL either breaks or keeps fetching the outdated location, making migration costly.

What is a vanity import domain?

A domain you control, such as go.iain.rocks, used as the import path. A go-import meta tag tells the Go tool where the real git repository lives, so you can change hosting without changing import paths.

Do major projects already do this?

Yes. Cambridge points to go.uber.org and go.mongodb.org as existing examples of Go modules namespaced under custom domains rather than git hosts.

How does the server distinguish the Go tool from human visitors?

The Go tool requests the URL with a ?go-get=1 query parameter. The Nginx configuration in the post serves the go-import HTML to those requests and permanently redirects everyone else to the actual repository.

Is the claim about the company paying for three hosting services verified?

No. It is presented as Cambridge’s first-hand observation in his blog post and is not independently corroborated.

Source: hn

COLUMBUS DAY / I

Columbus Day / Indigenous Peoples' Day Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

Software Testing Tools: A Prime Big Deal Days Guide

Compare software testing tools by purpose, cost, and upkeep, then build a dependable test setup that fits your team.

A Look At Gewerkton’s Two-Day Relaunch And Its AI Agents

Gewerkton says its app, Studio and 529-page website moved to HORIZON on Oct. 2-3, with AI agents doing implementation under human review.

A Marketplace For Claude: Anthropic Adds 2,000+ Plugins And Connectors

A BleepingComputer headline reports a Claude marketplace with more than 2,000 plugins and connectors, but launch details and the count remain unverified here.

Can Ironclad Help Move Computer Use Forward?

OpenAI has a page titled “Advancing computer use with Ironclad,” but the available information does not establish what the project is or what it does.