Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a command option name to be consistent with kubectl #2

Merged
merged 2 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
}