Skip to content

Commit

Permalink
chore: Update the readme (#15)
Browse files Browse the repository at this point in the history
* chore: update the README

Signed-off-by: hectorj2f <[email protected]>

* Update README.md

Co-authored-by: Dan Luhring <[email protected]>
Signed-off-by: Hector Fernandez <[email protected]>

* remove NOTE about go mod tidy

Signed-off-by: hectorj2f <[email protected]>

---------

Signed-off-by: hectorj2f <[email protected]>
Signed-off-by: Hector Fernandez <[email protected]>
Co-authored-by: Dan Luhring <[email protected]>
  • Loading branch information
hectorj2f and luhring authored Jan 17, 2024
1 parent ffb05be commit b10c54a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ GoBump is a simple command-line tool written in Go that allows you to update the
## Usage

```shell
gobump -packages=<package@version>,... -modroot=<path to go mod>
gobump --packages=<package@version>,... --modroot=<path to go.mod>
```

**NOTE**: This tool does not run `go mod tidy` at the end, you must run that yourself.

### Flags

* `-packages`: A comma-separated list of packages to update. Each package should be in the format `package@version`.
* `-modroot`: Path to the go.mod root. If not specified, it defaults to the current directory.
* `-replaces`: A comma-separated list of packages to replace. Each entry should be in the format `old=new@version`.

* `--packages`: A comma-separated list of packages to update. Each package should be in the format `package@version`.
* `--modroot`: Path to the go.mod root. If not specified, it defaults to the current directory.
* `--replaces`: A comma-separated list of packages to replace. Each entry should be in the format `old=new@version`.
* `--go-version`: set the go-version for 'go mod tidy' command.
* `--show-diff`: Show the difference between the original and 'go.mod' files.
* `--tidy`: Run 'go mod tidy' command.

## Example

```shell
gobump -packages=github.com/pkg/[email protected],golang.org/x/[email protected] -modroot=/path/to/your/project
gobump --packages=github.com/pkg/[email protected],golang.org/x/[email protected] --modroot=/path/to/your/project
```

This will update the versions of `github.com/pkg/errors` and `golang.org/x/mod` in your `go.mod` file.
Expand Down

0 comments on commit b10c54a

Please sign in to comment.