8000 Fix cli default argument value. by fujiwara · Pull Request #9 · fujiwara/ecrm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix cli default argument value. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ ecrm: go.* *.go cmd/ecrm/main.go
8000 go build -o $@ cmd/ecrm/main.go

clean:
rm -f ecrm
rm -rf ecrm dist/

test:
go test -v ./...

install:
go install github.com/fujiwara/ecrm/cmd/ecrm

dist:
goreleaser build --snapshot --rm-dist
24 changes: 11 additions & 13 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,15 @@ func (app *App) NewPlanCommand() *cli.Command {
Usage: "Scan ECS/Lambda resources and find unused ECR images to delete safety.",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "repository",
Aliases: []string{"r"},
DefaultText: "",
Usage: "plan for only images in `REPOSITORY`",
EnvVars: []string{"ECRM_REPOSITORY"},
Name: "repository",
Aliases: []string{"r"},
Usage: "plan for only images in `REPOSITORY`",
EnvVars: []string{"ECRM_REPOSITORY"},
},
&cli.StringFlag{
Name: "format",
DefaultText: 8000 "table",
Usage: "plan output format (table, json)",
Name: "format",
Value: "table",
Usage: "plan output format (table, json)",
},
},
Action: func(c *cli.Context) error {
Expand Down Expand Up @@ -79,11 +78,10 @@ func (app *App) NewDeleteCommand() *cli.Command {
EnvVars: []string{"ECRM_FORCE"},
},
&cli.StringFlag{
Name: "repository",
Aliases: []string{"r"},
DefaultText: "",
Usage: "delete only images in `REPOSITORY`",
EnvVars: []string{"ECRM_REPOSITORY"},
Name: "repository",
Aliases: []string{"r"},
Usage: "delete only images in `REPOSITORY`",
EnvVars: []string{"ECRM_REPOSITORY"},
},
},
Action: func(c *cli.Context) error {
Expand Down
0