Go modules: go.mod, versions, MVS and vendoring

10 steps · about 4 h 5 min · Intermediate

  1. Tutorial: Create a Go module (tutorial, go.dev, 20 min)

    Start with the official hands-on tutorial that creates your first module and go.mod with go mod init.

  2. Using Go Modules (blog, The Go Blog, 20 min)

    Next, the Go team walks through adding, upgrading and removing dependencies with go get, go list -m all and go mod tidy.

  3. How to Use Go Modules (tutorial, DigitalOcean, 25 min)

    This reinforces the workflow and explains go.sum, // indirect markers and workspaces in plain language.

  4. A Primer To Go Modules (article, DEV Community (Bjarne Magnussen), 15 min)

    It covers semantic versioning (v1.2.3) and gives a first intuition for how Go chooses versions.

  5. Modules Part 03: Minimal Version Selection (blog, Ardan Labs, 20 min)

    Worked examples with real go.sum and go list output show why Go does not pick the latest version.

  6. 17.3 Minimal Version Selection (article, Go under the hood (golang.design), 20 min)

    Once the idea is familiar, this shows MVS as a short algorithm and points to the original sources.

  7. Proposal: Versioned Go Modules (article, golang/proposal on GitHub, 30 min)

    It gives the design rationale: why new versions are never picked up automatically, and how exclude and replace work.

  8. Go Modules Deep Dive: Versioning, Vendoring, and Private Repositories (article, Reintech, 20 min)

    This covers the practical commands for pinning, upgrading and major-version paths, plus vendoring and private repos.

  9. Go modules in depth: vendoring, workspaces, and reproducible builds (article, StackHarbor, 15 min)

    It helps you decide when to commit vendor/ (offline builds, CI, review) and when to skip it.

  10. Go Modules Reference (reference, go.dev, 1 h)

    Finish with the authoritative spec for go.mod directives, MVS, vendoring and workspaces, to use as a lookup.