From a4f72b4c9555de1370e0c6d2df2811c2957b5883 Mon Sep 17 00:00:00 2001 From: Shaurya Gulati Date: Tue, 17 Oct 2023 17:49:54 +0530 Subject: [PATCH] feat: Add examples to --help output for "delete PROJECT ROLE-NAME" (#15986) * feat: Add examples to --help output for delete PROJECT ROLE-NAME Signed-off-by: Shauryagulati --------- Signed-off-by: Shauryagulati --- cmd/argocd/commands/project_role.go | 6 ++++++ docs/user-guide/commands/argocd_proj_role_delete.md | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/cmd/argocd/commands/project_role.go b/cmd/argocd/commands/project_role.go index 987e61914d8582..ecc7d670ce42e3 100644 --- a/cmd/argocd/commands/project_role.go +++ b/cmd/argocd/commands/project_role.go @@ -18,6 +18,7 @@ import ( "github.com/argoproj/argo-cd/v2/util/errors" "github.com/argoproj/argo-cd/v2/util/io" "github.com/argoproj/argo-cd/v2/util/jwt" + "github.com/argoproj/argo-cd/v2/util/templates" ) const ( @@ -176,6 +177,11 @@ func NewProjectRoleDeleteCommand(clientOpts *argocdclient.ClientOptions) *cobra. var command = &cobra.Command{ Use: "delete PROJECT ROLE-NAME", Short: "Delete a project role", + Example: templates.Examples(` + # Delete a project role from the "my-project" project with the name "my-role". + argocd proj role delete my-project my-role + `), + Run: func(c *cobra.Command, args []string) { ctx := c.Context() diff --git a/docs/user-guide/commands/argocd_proj_role_delete.md b/docs/user-guide/commands/argocd_proj_role_delete.md index 42fc14fd031b8b..0d25facb226917 100644 --- a/docs/user-guide/commands/argocd_proj_role_delete.md +++ b/docs/user-guide/commands/argocd_proj_role_delete.md @@ -8,6 +8,13 @@ Delete a project role argocd proj role delete PROJECT ROLE-NAME [flags] ``` +### Examples + +``` + # Delete a project role from the "my-project" project with the name "my-role". + argocd proj role delete my-project my-role +``` + ### Options ```