From b10c54a40ba783d7dd7aec4127dc809b22d7f3d3 Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Wed, 17 Jan 2024 01:44:34 +0100 Subject: [PATCH] chore: Update the readme (#15) * chore: update the README Signed-off-by: hectorj2f * Update README.md Co-authored-by: Dan Luhring Signed-off-by: Hector Fernandez * remove NOTE about go mod tidy Signed-off-by: hectorj2f --------- Signed-off-by: hectorj2f Signed-off-by: Hector Fernandez Co-authored-by: Dan Luhring --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a775974..220eb1f 100644 --- a/README.md +++ b/README.md @@ -4,21 +4,22 @@ GoBump is a simple command-line tool written in Go that allows you to update the ## Usage ```shell -gobump -packages=,... -modroot= +gobump --packages=,... --modroot= ``` -**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/errors@v0.9.1,golang.org/x/mod@v0.4.2 -modroot=/path/to/your/project +gobump --packages=github.com/pkg/errors@v0.9.1,golang.org/x/mod@v0.4.2 --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.