Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
icholy committed Sep 10, 2023
1 parent 1640a5f commit f42a507
Showing 1 changed file with 31 additions and 42 deletions.
73 changes: 31 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,66 @@
# GOMAJOR

> A tool for major version upgrades
## Installation

```
go install github.com/icholy/gomajor@latest
```sh
$ go install github.com/icholy/gomajor@latest
```

## Usage

```
$ gomajor help
## Commands

GoMajor is a tool for major version upgrades
* `get` - Upgrade to a major version
* `list` - List available updates
* `path` - Modify the module path
* `version` - Print the gomajor version
* `help` - Show this help text

Usage:
Usage format is as follows: `gomajor <command> [arguments]`

gomajor <command> [arguments]
## Usage

The commands are:
#### List Updates

get upgrade to a major version
list list available updates
path modify the module path
version print the gomajor version
help show this help text
```
$ gomajor list
```

### List Updates
#### Update a module to its latest version

```
$ gomajor list
github.com/go-redis/redis: v6.15.9+incompatible [latest v8.1.3]
$ gomajor get github.com/go-redis/redis@latest
```

### Update and Rewrite Imports
#### Switch a module to a specific version

```
$ gomajor get github.com/go-redis/redis@latest
go get github.com/go-redis/redis/[email protected]
foo.go:4:2 github.com/go-redis/redis/v8
bar.go:5:2 github.com/go-redis/redis/v8
$ gomajor get github.com/go-redis/redis@v7
```

**Note:** Use `gomajor get all` to update all modules.
### Update all mobules to their latest version

```
$ gomajor get all
```

### Increment Module Path Version
#### 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
#### Change module path version

```
$ 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 ...
$ gomajor path -version v3
```

### Features:
#### Change module path

* Finds latest version.
* Rewrites your import paths.
* Lets you ignore SIV on the command line.
* Update your module's major version.
```
$ gomajor path goredis.io
```

### Warning:

Expand Down

0 comments on commit f42a507

Please sign in to comment.