A brief tour of other common functionality you might use:
go list -m all
— View final versions that will be used in a build for all direct and indirect dependencies (details)go list -u -m all
— View available minor and patch upgrades for all direct and indirect dependencies (details)go get -u
orgo get -u=patch
— Update all direct and indirect dependencies to latest minor or patch upgrades (details)go build ./...
orgo test ./...
— Build or test all packages in the module when run from the module root directory (details)go mod tidy
— Prune any no-longer-needed dependencies fromgo.mod
and add any dependencies needed for other combinations of OS, architecture, and build tags (details)replace
directive orgohack
— Use a fork, local copy or exact version of a dependency (details)go mod vendor
— Optional step to create avendor
directory (details)
Reference: https://github.com/golang/go/wiki/Modules