mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 19:23:40 +00:00
Merge pull request #64516 from soltysh/fix_error
Automatic merge from submit-queue (batch tested with PRs 64318, 64269, 64438, 64516, 64311). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix error message to be consistent with others **Special notes for your reviewer**: /assign @juanvallejo **Release note**: ```release-note NONE ```
This commit is contained in:
commit
65573739fe
@ -34,7 +34,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
apiresources_example = templates.Examples(`
|
apiresourcesExample = templates.Examples(`
|
||||||
# Print the supported API Resources
|
# Print the supported API Resources
|
||||||
kubectl api-resources
|
kubectl api-resources
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ func NewCmdApiResources(f cmdutil.Factory, ioStreams genericclioptions.IOStreams
|
|||||||
Use: "api-resources",
|
Use: "api-resources",
|
||||||
Short: "Print the supported API resources on the server",
|
Short: "Print the supported API resources on the server",
|
||||||
Long: "Print the supported API resources on the server",
|
Long: "Print the supported API resources on the server",
|
||||||
Example: apiresources_example,
|
Example: apiresourcesExample,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
cmdutil.CheckErr(o.Validate(cmd))
|
cmdutil.CheckErr(o.Validate(cmd))
|
||||||
cmdutil.CheckErr(o.RunApiResources(cmd, f))
|
cmdutil.CheckErr(o.RunApiResources(cmd, f))
|
||||||
@ -104,7 +104,7 @@ func NewCmdApiResources(f cmdutil.Factory, ioStreams genericclioptions.IOStreams
|
|||||||
func (o *ApiResourcesOptions) Validate(cmd *cobra.Command) error {
|
func (o *ApiResourcesOptions) Validate(cmd *cobra.Command) error {
|
||||||
supportedOutputTypes := sets.NewString("", "wide", "name")
|
supportedOutputTypes := sets.NewString("", "wide", "name")
|
||||||
if !supportedOutputTypes.Has(o.Output) {
|
if !supportedOutputTypes.Has(o.Output) {
|
||||||
return fmt.Errorf("--output %v is not available in kubectl api-resources", o.Output)
|
return fmt.Errorf("--output %v is not available", o.Output)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user