go mod tidy

From wikieduonline
Jump to navigation Jump to search

go mod tidy ensures that the go.mod file matches the source code in the module

Examples[edit]

go mod tidy
(no output)
go mod tidy
go: downloading github.com/prometheus/client_golang v1.20.5
go: downloading k8s.io/api v0.31.2
.../...
go mod tidy
go: warning: "all" matched no packages
go mod tidy
go: errors parsing go.mod:
go.mod:11:5: require cert-manager.io/v1: version "v1.16.1" invalid: malformed module path "cert-manager.io/v1"

See also[edit]

See also[edit]

Advertising: