Difference between go mod download and go mod tidy

go mod download
is downloading all of the modules in the dependency graph, which it can determine from reading only the go.mod files. It doesn’t know which of those modules are actually needed to satisfy a build, so it doesn’t pull in the checksums for those modules (because they may not be relevant).

On the other hand, go mod tidy has to walk the package graph in order to ensure that all imports are satisfied. So it knows, for a fact, without doing any extra work, that the modules it walks through are needed for a go build in some configuration.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)