Web Analytics

Wildcard Routing: One Rule to Manage 50 Go Modules

The Route Tax You’ve adopted vanity URLs for your Go modules. Clean import paths, platform-independent, looking good: import "go.mycorp.com/auth" import "go.mycorp.com/config" import "go.mycorp.com/logger" Then your team grows. New services get created every sprint. And every single one needs its own gvu add command: gvu add go.mycorp.com/auth https://github.com/mycorp/auth.git gvu add go.mycorp.com/config https://github.com/mycorp/config.git gvu add go.mycorp.com/logger https://github.com/mycorp/logger.git gvu add go.mycorp.com/cache https://github.com/mycorp/cache.git gvu add go.mycorp.com/queue https://github.com/mycorp/queue.git # ... 45 more Fifty repos. Fifty routes. Every new repo means a pull request to update the routing config. Someone forgets? The new service’s go get fails and the team is blocked. ...

July 14, 2026 · Tony Bai

Go Monorepo in Practice: Managing Multiple Modules with Vanity URLs

The Monorepo Dilemma Your team uses a monorepo. All Go services live under one Git repository: monorepo/ ├── go/ │ ├── auth/ │ │ └── go.mod # module github.com/org/monorepo/go/auth │ ├── config/ │ │ └── go.mod # module github.com/org/monorepo/go/config │ └── logger/ │ └── go.mod # module github.com/org/monorepo/go/logger ├── proto/ ├── deploy/ └── README.md Three Go modules, one repo. This is a common pattern — shared CI, atomic cross-module changes, consistent versioning. ...

July 13, 2026 · Tony Bai

From IP Addresses to a Branded Domain: One Go Team's Vanity URL Journey

“What Service Is 10.0.1.50?” Alex stared at the error message on his screen, frowning. build failed: cannot find module "10.0.1.50/user-service": module lookup disabled by GOPROXY=off He turned to the new hire sitting next to him: “Do you know what 10.0.1.50 is?” Ben looked blank. He’d only been with the company for three days. This was daily life at Alex’s company — a mid-sized fintech firm. The platform team had over 50 Go microservices, all using internal IP addresses as import paths. Nobody thought anything of it — until last week’s server migration. ...

July 12, 2026 · Tony Bai

Set Up a Custom Import Path for Your Go Module in 30 Seconds

What Is a Vanity URL? A Vanity URL gives your Go module an import path you own, instead of one tied to GitHub or GitLab. // ❌ Long and platform-dependent import "github.com/your-org/your-project" // ✅ Short, branded, platform-independent import "go.yourcompany.com/your-project" The actual code can live on any Git server — GitHub, GitLab, Gitea, self-hosted. When you switch repositories, the import path stays the same. This tutorial gets you there in 30 seconds. ...

July 12, 2026 · Tony Bai

Why Your Go Private Modules Shouldn't Use Raw GitHub Paths

A Real Nightmare Last year, a friend of mine — let’s call him Alex — made a perfectly reasonable decision: migrate his company’s code from GitHub Enterprise to a self-hosted GitLab instance. Sounds straightforward, right? Move the repos, tweak the CI, and call it a day. Until they realized: all 200+ Go microservices had import paths starting with github.com/their-org/. Moving the repositories took a weekend. But updating the import paths across every downstream service? Three engineers spent two weeks on it. Then another week for regression testing. ...

July 12, 2026 · Tony Bai