go mod

Module maintenance

Subcommands

NameDescription
downloadDownload the named modules into the module cache
editEdit and format go.mod files
graphPrint the module requirement graph
initInitialize and write a new go.mod file in the current directory
tidyEnsure that the go.mod file matches the source code in the module
vendorConstruct a directory named vendor in the main module's root directory
verifyCheck that dependencies of the main module stored in the module cache have not been modified since they were downloaded
whyShow a shortest path in the import graph from the main module to each of the listed packages