Documentation
¶
Overview ¶
Command gomod extends the go mod command.
'gomod' does not use the 'go' command and it does not use the module cache. It only uses the locally cloned repositories and the 'git' command.
Example of usage ¶
Install and run the update subcommand:
~ $ go install modernc.org/gomod@latest ~ $ ( cd $(go env GOPATH)/src && gomod update | grep 'in modernc\.org' ) in modernc.org/fileutil go get -d modernc.org/mathutil@v1.5.0 in modernc.org/hash go get -d modernc.org/mathutil@v1.5.0 in modernc.org/memory go get -d modernc.org/mathutil@v1.5.0 in modernc.org/sortutil go get -d modernc.org/mathutil@v1.5.0 in modernc.org/strutil go get -d modernc.org/mathutil@v1.5.0 ~ $
Subcommand update ¶
Find git repositories in or bellow current directory and learn their tags. Look for go.mod files and try to determine dependencies that can be be updated.
Options
-all suggest also updating to tags of modules that themselves need updating -head list repositores not tagged at HEAD -v verbose output
Caveats ¶
- At the moment only the 'require' clause of go.mod files is considered.
- 'vendor' directories are ignored.
Legacy ¶
This used to be a tool that predated go work files. To get the old behavior of this command
$ go install modernc.org/gomod@v1.0.0
But it is recommended to use the better 'go work' command.
Click to show internal directories.
Click to hide internal directories.