Skip to content
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

fix: cli usage info #55

Merged
merged 4 commits into from
Jun 28, 2023
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
18 changes: 4 additions & 14 deletions pkg/cli/cli_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,13 @@ func (c *CLIHandleCommand) Help() string {
return `
Usage: {{ COMMAND }} [options]

Run "do" commands in the CLI request YAML file at the given path:
Handle CLI request YAML file at the given path:

aod cli do -path "/path/to/file.yaml"
{{ COMMAND }} -path "/path/to/file.yaml"

Handle CLI request YAML file at the given path in debug mode:

Run "do" commands in the CLI request YAML file at the given path in debug mode:

aod cli do -path "/path/to/file.yaml" -debug

Run "cleanup" commands in the CLI request YAML file at the given path:

aod cli cleanup -path "/path/to/file.yaml"


Run "cleanup" commands in the CLI request YAML file at the given path in debug mode:

aod cli cleanup -path "/path/to/file.yaml" -debug
{{ COMMAND }} -path "/path/to/file.yaml" -debug
`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/cli_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Usage: {{ COMMAND }} [options]

Validate the IAM request YAML file at the given path:

aod cli validate -path "/path/to/file.yaml"
{{ COMMAND }} -path "/path/to/file.yaml"
`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/iam_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Usage: {{ COMMAND }} [options]

Handle the IAM request YAML file in the given path:

aod iam handle -path "/path/to/file.yaml" -duration "2h" -start-time "2009-11-10T23:00:00Z"
{{ COMMAND }} -path "/path/to/file.yaml" -duration "2h" -start-time "2009-11-10T23:00:00Z"
`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/iam_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Usage: {{ COMMAND }} [options]

Validate the IAM request YAML file at the given path:

aod iam validate -path "/path/to/file.yaml"
{{ COMMAND }} -path "/path/to/file.yaml"
`
}

Expand Down
1 change: 1 addition & 0 deletions pkg/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var rootCmd = func() cli.Command {
return &CLIHandleCommand{}
},
"cleanup": func() cli.Command {
// TODO(#58): Cleanup as an input is anti-pattern, need a better command structure.
return &CLIHandleCommand{Cleanup: true}
},
"validate": func() cli.Command {
Expand Down