Merge pull request #125641 from nirs/sample-cli-plugin-help

Sample cli plugin help
This commit is contained in:
Kubernetes Prow Robot 2024-06-26 10:59:02 -07:00 committed by GitHub
commit 437f6e92ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,6 +82,9 @@ func NewCmdNamespace(streams genericiooptions.IOStreams) *cobra.Command {
Short: "View or set the current namespace",
Example: fmt.Sprintf(namespaceExample, "kubectl"),
SilenceUsage: true,
Annotations: map[string]string{
cobra.CommandDisplayNameAnnotation: "kubectl ns",
},
RunE: func(c *cobra.Command, args []string) error {
if err := o.Complete(c, args); err != nil {
return err