What is the Go module proxy and how does workspace mode work?
Answer
The Go module proxy (GOPROXY, defaulting to proxy.golang.org) is a caching HTTP server that serves module versions. When you run go get, Go fetches modules from the proxy rather than directly from version control, providing immutability guarantees (modules cannot be deleted once published), faster downloads, and a checksum database (sum.golang.org) that cryptographically verifies module contents against a transparency log. Go workspace mode (introduced in Go 1.18 via go work init) allows you to work across multiple modules simultaneously — changes in a local dependency module are immediately visible without publishing a new version. A go.work file lists the local module directories to use, and the workspace takes precedence over the module proxy for those modules.