From d8c6689f473f3514267a43a2faa3a86b364c1aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diogo=20Ferr=C3=A3o?= Date: Fri, 15 Mar 2024 18:14:32 +0100 Subject: [PATCH] update command: improve examples, add name shorthand flag --- docs/stackit_argus_instance_update.md | 4 ++-- internal/cmd/argus/instance/update/update.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/stackit_argus_instance_update.md b/docs/stackit_argus_instance_update.md index 9ce600d11..8fcae4c69 100644 --- a/docs/stackit_argus_instance_update.md +++ b/docs/stackit_argus_instance_update.md @@ -17,7 +17,7 @@ stackit argus instance update INSTANCE_ID [flags] $ stackit argus instance update xxx --plan-id yyy Update the plan of an Argus instance with ID "xxx" by specifying the plan name - $ stackit argus instance update xxx --plan-name yyy + $ stackit argus instance update xxx --plan-name Frontend-Starter-EU01 Update the name of an Argus instance with ID "xxx" $ stackit argus instance update xxx --name new-instance-name @@ -27,7 +27,7 @@ stackit argus instance update INSTANCE_ID [flags] ``` -h, --help Help for "stackit argus instance update" - --name string Instance name + -n, --name string Instance name --plan-id string Plan ID --plan-name string Plan name ``` diff --git a/internal/cmd/argus/instance/update/update.go b/internal/cmd/argus/instance/update/update.go index 3bd4cd774..a1d807dad 100644 --- a/internal/cmd/argus/instance/update/update.go +++ b/internal/cmd/argus/instance/update/update.go @@ -50,7 +50,7 @@ func NewCmd() *cobra.Command { "$ stackit argus instance update xxx --plan-id yyy"), examples.NewExample( `Update the plan of an Argus instance with ID "xxx" by specifying the plan name`, - "$ stackit argus instance update xxx --plan-name yyy"), + "$ stackit argus instance update xxx --plan-name Frontend-Starter-EU01"), examples.NewExample( `Update the name of an Argus instance with ID "xxx"`, "$ stackit argus instance update xxx --name new-instance-name"), @@ -123,7 +123,7 @@ func NewCmd() *cobra.Command { func configureFlags(cmd *cobra.Command) { cmd.Flags().Var(flags.UUIDFlag(), planIdFlag, "Plan ID") cmd.Flags().String(planNameFlag, "", "Plan name") - cmd.Flags().String(instanceNameFlag, "", "Instance name") + cmd.Flags().StringP(instanceNameFlag, "n", "", "Instance name") } func parseInput(cmd *cobra.Command, inputArgs []string) (*inputModel, error) {