3.7 Go Workspaces (1.18+): Multi-Module Development
Alright, let’s talk about Go Workspaces. You’ve been there, right? You’re hacking on a big project, maybe a monorepo, with a dozen different Go modules. example.com/foo, example.com/bar, example.com/bar/v2—the whole gang. You need to make a change in foo that bar depends on. The old dance was miserable: you’d cd into foo, run go mod edit -replace example.com/foo=../foo, pray, then do the same in any other module that needed the change. It was a tedious, error-prone mess that littered your go.mod files with temporary junk you had to remember to remove before committing. It sucked.