Screening Entry Level

How do Go modules work? What happens when two of your dependencies require different versions of the same package?

Quick Tip

Highlight MVS: "Go uses minimum version selection, which is deterministic and avoids surprise upgrades. If two deps need v1.2 and v1.5 of a library, Go picks v1.5 — the minimum that satisfies both."

What good answers include

Go modules use semantic versioning with go.mod and go.sum files. Minimum version selection (MVS) picks the minimum version that satisfies all requirements — unlike npm or pip which pick the latest. For major version conflicts, Go treats v2+ as different module paths (import path includes /v2). Strong candidates explain MVS, the replace directive for local development, and how go mod tidy cleans up unused dependencies.

What interviewers are looking for

Baseline Go tooling knowledge. Candidates who cannot explain modules and dependency resolution will struggle with real projects. Ask about a diamond dependency problem they have resolved.

← All Go questions