Skip to content

Commit

Permalink
Removes the short hand -a for annotation flag
Browse files Browse the repository at this point in the history
  • Loading branch information
navidshaikh committed Oct 4, 2019
1 parent 3c72ca3 commit c127519
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/cmd/kn_service_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/cmd/kn_service_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/kn/commands/service/configuration_edit_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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-).")
Expand Down
10 changes: 5 additions & 5 deletions pkg/kn/commands/service/service_update_mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ 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)
assert.Assert(t, util.ContainsAll(output, "created", svcName, "default"))

output, err = executeServiceCommand(client,
"update", svcName,
"-a", "an2=isUpdated",
"-a", "an3-",
"--annotation", "an2=isUpdated",
"--annotation", "an3-",
"--async", "--revision-name=",
)
assert.NilError(t, err)
Expand Down

0 comments on commit c127519

Please sign in to comment.