-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updaete Readme and Improve Error message in the root command (#16)
Signed-off-by: debasishbsws <[email protected]>
- Loading branch information
1 parent
b10c54a
commit f98e8e9
Showing
2 changed files
with
11 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +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> | ||
``` | ||
|
||
### Flags | ||
|
||
* `--packages`: A comma-separated list of packages to update. Each package should be in the format `package@version`. | ||
* `--packages`: A space-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`. | ||
* `--replaces`: A space-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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters