From c127519d24b3861f002bdfd2c229fc0df7ca243c Mon Sep 17 00:00:00 2001 From: Navid Shaikh Date: Fri, 4 Oct 2019 15:13:34 +0530 Subject: [PATCH] Removes the short hand -a for annotation flag --- docs/cmd/kn_service_create.md | 2 +- docs/cmd/kn_service_update.md | 2 +- pkg/kn/commands/service/configuration_edit_flags.go | 2 +- pkg/kn/commands/service/service_update_mock_test.go | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/cmd/kn_service_create.md b/docs/cmd/kn_service_create.md index e4e5bb865c..ee00c7a725 100644 --- a/docs/cmd/kn_service_create.md +++ b/docs/cmd/kn_service_create.md @@ -42,7 +42,7 @@ kn service create NAME --image IMAGE [flags] ### Options ``` - -a, --annotation stringArray Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). + --annotation stringArray Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). --async Create service and don't wait for it to become ready. --concurrency-limit int Hard Limit of concurrent requests to be processed by a single replica. --concurrency-target int Recommendation for when to scale up based on the concurrent number of incoming request. Defaults to --concurrency-limit when given. diff --git a/docs/cmd/kn_service_update.md b/docs/cmd/kn_service_update.md index 6514554cd9..d01aa95e0b 100644 --- a/docs/cmd/kn_service_update.md +++ b/docs/cmd/kn_service_update.md @@ -38,7 +38,7 @@ kn service update NAME [flags] ### Options ``` - -a, --annotation stringArray Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). + --annotation stringArray Service annotation to set. name=value; you may provide this flag any number of times to set multiple annotations. To unset, specify the annotation name followed by a "-" (e.g., name-). --async Update service and don't wait for it to become ready. --concurrency-limit int Hard Limit of concurrent requests to be processed by a single replica. --concurrency-target int Recommendation for when to scale up based on the concurrent number of incoming request. Defaults to --concurrency-limit when given. diff --git a/pkg/kn/commands/service/configuration_edit_flags.go b/pkg/kn/commands/service/configuration_edit_flags.go index 72a3881cba..70cdf2ca8e 100644 --- a/pkg/kn/commands/service/configuration_edit_flags.go +++ b/pkg/kn/commands/service/configuration_edit_flags.go @@ -111,7 +111,7 @@ func (p *ConfigurationEditFlags) addSharedFlags(command *cobra.Command) { // Don't mark as changing the revision. command.Flags().StringVar(&p.ServiceAccountName, "service-account", "", "Service account name to set. Empty service account name will result to clear the service account.") p.markFlagMakesRevision("service-account") - command.Flags().StringArrayVarP(&p.Annotations, "annotation", "a", []string{}, + command.Flags().StringArrayVar(&p.Annotations, "annotation", []string{}, "Service annotation to set. name=value; you may provide this flag "+ "any number of times to set multiple annotations. "+ "To unset, specify the annotation name followed by a \"-\" (e.g., name-).") diff --git a/pkg/kn/commands/service/service_update_mock_test.go b/pkg/kn/commands/service/service_update_mock_test.go index bd0d28b3b2..804b6da57c 100644 --- a/pkg/kn/commands/service/service_update_mock_test.go +++ b/pkg/kn/commands/service/service_update_mock_test.go @@ -111,9 +111,9 @@ func TestServiceUpdateAnnotationsMock(t *testing.T) { output, err := executeServiceCommand(client, "create", svcName, "--image", "gcr.io/foo/bar:baz", - "-a", "an1=staysConstant", - "-a", "an2=getsUpdated", - "-a", "an3=getsRemoved", + "--annotation", "an1=staysConstant", + "--annotation", "an2=getsUpdated", + "--annotation", "an3=getsRemoved", "--async", "--revision-name=", ) assert.NilError(t, err) @@ -121,8 +121,8 @@ func TestServiceUpdateAnnotationsMock(t *testing.T) { output, err = executeServiceCommand(client, "update", svcName, - "-a", "an2=isUpdated", - "-a", "an3-", + "--annotation", "an2=isUpdated", + "--annotation", "an3-", "--async", "--revision-name=", ) assert.NilError(t, err)