Read a go.mod file: requires, replace directives, retractions, pseudo-versions and the /vN major suffix rule, with what each one actually pins.
Waiting for a go.mod
Nothing is uploaded. Paste the file, or load an example.
Go resolves with minimal version selection: each requirement is a floor, and the version built is the highest floor anyone in the graph asks for. So a require line is not a pin — it is the lowest version you will accept, and the version you actually get is decided by whichever dependency asks for most.
Paste a go.mod to see what it declares and how far each dependency can move.
This reads the file only. It does not run go mod tidy, build the module graph, contact a module proxy or check the checksum database, so it cannot tell you which version would actually be selected — only what this file asks for. A module path’s /vN suffix is checked against the versions required of it, because that mismatch is a compile error rather than a style preference.
go.mod Inspector runs entirely on your device — your go.mod is parsed in your browser and nothing is sent to a proxy or a registry
You’re on the Free plan. Compare plans
A require line in Go is not a pin. Minimal version selection treats every requirement as a floor and builds the highest floor anyone in the graph asks for, so the version you get is decided by whichever dependency asks for most — not by the line in front of you. Each dependency here is labelled by what a resolver may do with it rather than by how the constraint looks.
A pseudo-version is the opposite of what it appears to be. Something like v0.0.0-20240115093400-6f7b2e1c0a81 looks like the loosest thing in the file and is in fact the tightest: it names one commit. There are three forms of it and in two of them the timestamp follows a dot rather than a dash, which is why a careless reader reports two thirds of real pseudo-versions as unpinned.
Replace directives get their own view because they are the only thing here that silently changes what gets built, they apply only while this module is the main one, and a local filesystem replace left in a committed file breaks the build for everybody else. A replace with no version on the left applies to every version the graph selects, including ones a future dependency introduces.
Because Go uses minimal version selection. Every require is the lowest version you will accept, and the build uses the highest such floor across the whole module graph. Your line says v1.4.0 and you may well be building v1.9.2 because something else asked for it.
No — it is the tightest pin there is. It encodes a specific commit hash, so it resolves to exactly one revision. The shape looks unstable, which is why people replace them with tags and accidentally loosen the dependency.
Because it changes what is built without changing what is required, and it only takes effect in the main module. Published as a library, your replaces are ignored by consumers — so a library that only builds because of a replace does not build for anyone else.
No. That needs the full module graph, which means reading every dependency's own go.mod. This reads one file and says what it asks for; go list -m all in the project gives you what was chosen.
No. Nothing is fetched, no module is downloaded and no checksum is verified. The file is parsed in your browser.
If a tool here saved you some time, you can put something towards the hosting.Buy me a coffee, on Ko-fi, opens in a new tab