Skip to content

Commit

Permalink
feat(cli): Add examples to --help output for "gpg_list" (#16017)
Browse files Browse the repository at this point in the history
* feat: Add examples to --help output for list

Signed-off-by: Ratan Gulati <[email protected]>

* updated file

Signed-off-by: Ratan Gulati <[email protected]>

---------

Signed-off-by: Ratan Gulati <[email protected]>
  • Loading branch information
Ratangulati authored Oct 27, 2023
1 parent 0c91395 commit 9b1fb1d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmd/argocd/commands/gpg.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ func NewGPGListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var command = &cobra.Command{
Use: "list",
Short: "List configured GPG public keys",
Example: templates.Examples(`
# List all configured GPG public keys in wide format (default).
argocd gpg list
# List all configured GPG public keys in JSON format.
argocd gpg list -o json
# List all configured GPG public keys in YAML format.
argocd gpg list -o yaml
`),

Run: func(c *cobra.Command, args []string) {
ctx := c.Context()

Expand Down
13 changes: 13 additions & 0 deletions docs/user-guide/commands/argocd_gpg_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ List configured GPG public keys
argocd gpg list [flags]
```

### Examples

```
# List all configured GPG public keys in wide format (default).
argocd gpg list
# List all configured GPG public keys in JSON format.
argocd gpg list -o json
# List all configured GPG public keys in YAML format.
argocd gpg list -o yaml
```

### Options

```
Expand Down

0 comments on commit 9b1fb1d

Please sign in to comment.