gomod

command module
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

README

gomod

Command gomod extends the go mod command.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL