Skip to content

Commit

Permalink
make flag descriptions command agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejWilde committed Apr 20, 2020
1 parent e432f00 commit c1379a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/ctl/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func AddClusterFlag(cmd *cobra.Command, required bool, clusterURL *string) {
description := "the URL of the connect cluster to manage"
description := "the URL of the connect cluster"

if required {
description = requiredDescription(&description)
Expand Down Expand Up @@ -38,7 +38,7 @@ func AddDefinitionFilesFlags(cmd *cobra.Command, files *[]string, directory *str
}

func AddConnectorNamesFlags(cmd *cobra.Command, names *[]string) {
BindStringArrayVarP(cmd.Flags(), names, []string{}, "connectors", "n", "The connect names to restart (if not specified all connectors will be restarted)")
BindStringArrayVarP(cmd.Flags(), names, []string{}, "connectors", "n", "The connect names to perform action on (if not specified action will be performed on all connectors)")
}

func BindDurationVarP(f *pflag.FlagSet, p *time.Duration, value time.Duration, long, short, description string) {
Expand Down

0 comments on commit c1379a2

Please sign in to comment.