A tool for major version upgrades
go install github.com/icholy/gomajor@latest
get
- Upgrade to a major versionlist
- List available updatespath
- Modify the module path
Usage format is as follows: gomajor <command> [arguments]
gomajor list
gomajor get github.com/go-redis/redis@latest
gomajor get github.com/go-redis/redis@v7
gomajor get all
gomajor path -next
gomajor path -version v3
gomajor path goredis.io
- This tool does not understand
replace
directives or nested modules. - By default, only cached content will be fetched from the module proxy (See
-cached
flag). - If you have multiple major versions imported, ALL of them will be rewritten (See
-rewrite
flag). - The latest version will not be found if there are gaps between major version numbers.
- The
path
command does not rewrite package names. - Modules matching
GOPRIVATE
are skipped.