gomajor

command module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 13 Imported by: 0

README

GOMAJOR

$ gomajor help

GoMajor is a tool for major version upgrades

Usage:

    gomajor <command> [arguments]

The commands are:

    get     upgrade to a major version
    list    list available updates
    path    modify the module path
    help    show this help text
List Updates
$ gomajor list
github.com/go-redis/redis: v6.15.9+incompatible [latest v8.1.3]
Update and Rewrite Imports
$ gomajor get github.com/go-redis/redis@latest
go get github.com/go-redis/redis/v8@v8.1.3
foo.go:4:2 github.com/go-redis/redis/v8
bar.go:5:2 github.com/go-redis/redis/v8
Increment Module Path Version
$ gomajor path -next
module github.com/go-redis/redis/v9
bench_test.go:11:2 github.com/go-redis/redis/v9
cluster.go:15:2 github.com/go-redis/redis/v9/internal
cluster.go:16:2 github.com/go-redis/redis/v9/internal/hashtag
# etc ...
Change Module Path
$ gomajor path goredis.io
module goredis.io
bench_test.go:11:2 goredis.io
cluster.go:15:2 goredis.io/internal
cluster.go:16:2 goredis.io/internal/hashtag
# etc ...
Features:
  • Finds latest version.
  • Rewrites your import paths.
  • Lets you ignore SIV on the command line.
  • Update your module's major version.
Warning:
  • 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.
  • The latest version will not be found if there are gaps between major version numbers.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
importpaths
Package importpaths implements import path rewriting credit: https://gist.github.com/jackspirou/61ce33574e9f411b8b4a
Package importpaths implements import path rewriting credit: https://gist.github.com/jackspirou/61ce33574e9f411b8b4a

Jump to

Keyboard shortcuts

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