Skip to content

Commit

Permalink
Merge pull request #2 from dty1er/fix/usage
Browse files Browse the repository at this point in the history
Fix a command option name to be consistent with kubectl
  • Loading branch information
keisku authored Aug 12, 2021
2 parents 267bce3 + 11d87a3 commit 326f774
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Usage:
kubectl-secret-data [flags]
Flags:
-A, --all-namespace If present, find secrets from all namespaces
-A, --all-namespaces If present, find secrets from all namespaces
--cluster string The name of the kubeconfig context to use
--context string The name of the kubeconfig cluster to use
-h, --help help for kubectl-secret-data
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ type options struct {
Cluster string
Output string
Regex string
AllNamespace bool
AllNamespaces bool
}

func newOptions() options {
return options{
Namespace: "",
MultiNamespaces: "",
Output: "yaml",
AllNamespace: false,
AllNamespaces: false,
}
}

Expand All @@ -77,5 +77,5 @@ func (o *options) parseFlags(cmd *cobra.Command) {
cmd.PersistentFlags().StringVar(&o.KubeConfing, "kubeconfig", o.KubeConfing, "Path to the kubeconfig file to use for CLI requests")
cmd.PersistentFlags().StringVarP(&o.Output, "output", "o", o.Output, "The format of the result")
cmd.PersistentFlags().StringVarP(&o.Regex, "regex", "E", o.Regex, "The regular expression of secret name")
cmd.PersistentFlags().BoolVarP(&o.AllNamespace, "all-namespace", "A", o.AllNamespace, "If present, find secrets from all namespaces")
cmd.PersistentFlags().BoolVarP(&o.AllNamespaces, "all-namespaces", "A", o.AllNamespaces, "If present, find secrets from all namespaces")
}

0 comments on commit 326f774

Please sign in to comment.