Skip to content

Commit

Permalink
feat(cli): Add examples to --help output for get KEYID (argoproj#16019)
Browse files Browse the repository at this point in the history
Signed-off-by: Ratan Gulati <ratangulati.dev@gmail.com>
Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com>
  • Loading branch information
Ratangulati authored and jmilic1 committed Nov 13, 2023
1 parent 317a3ed commit a6f9369
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 @@ -84,6 +84,17 @@ func NewGPGGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command {
var command = &cobra.Command{
Use: "get KEYID",
Short: "Get the GPG public key with ID <KEYID> from the server",
Example: templates.Examples(`
# Get a GPG public key with the specified KEYID in wide format (default).
argocd gpg get KEYID
# Get a GPG public key with the specified KEYID in JSON format.
argocd gpg get KEYID -o json
# Get a GPG public key with the specified KEYID in YAML format.
argocd gpg get KEYID -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_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ Get the GPG public key with ID <KEYID> from the server
argocd gpg get KEYID [flags]
```

### Examples

```
# Get a GPG public key with the specified KEYID in wide format (default).
argocd gpg get KEYID
# Get a GPG public key with the specified KEYID in JSON format.
argocd gpg get KEYID -o json
# Get a GPG public key with the specified KEYID in YAML format.
argocd gpg get KEYID -o yaml
```

### Options

```
Expand Down

0 comments on commit a6f9369

Please sign in to comment.