0008: Modules Are the Build System
Date: 2026-06-14 Status: Accepted
Insight
Go modules (go.mod) are not just dependency management — they're the build system. The module path is the import path. Semantic versions drive compatibility. The /v2 convention for major versions is unique to Go. Understanding modules is essential for contributing to any Go project because the first thing you'll see in a PR is a go.mod diff.
The internal package convention is also critical — it's Go's visibility system beyond exported/unexported. Cloud-native projects use internal/ heavily to prevent external packages from depending on implementation details.
This lesson is less interactive than the concurrency lessons (it's mostly reference knowledge), but the exercises should be practical: create a multi-module project, use go.work, understand version resolution.
Consequences
- Lesson 0008: go.mod structure, versioning, internal packages, go.work
- Should reference the Go Modules Reference (official) as the authoritative source
- Exercises: create a module with internal packages, use replace directive, understand go mod tidy