mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 21:12:07 +00:00
Merge pull request #46696 from xiangpengzhao/mark-deprecated-command
Automatic merge from submit-queue (batch tested with PRs 47227, 47119, 46280, 47414, 46696) Mark deprecated info in short description of deprecated commands. **What this PR does / why we need it**: Mark deprecated commands in 'kubectl help'. See https://github.com/kubernetes/kubectl/issues/20 **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes/kubectl/issues/20 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
625a980941
@ -402,6 +402,7 @@ func deprecatedAlias(deprecatedVersion string, cmd *cobra.Command) *cobra.Comman
|
|||||||
|
|
||||||
cmd.Use = deprecatedVersion
|
cmd.Use = deprecatedVersion
|
||||||
cmd.Deprecated = fmt.Sprintf("use %q instead", originalName)
|
cmd.Deprecated = fmt.Sprintf("use %q instead", originalName)
|
||||||
|
cmd.Short = fmt.Sprintf("%s. This command is deprecated, use %q instead", cmd.Short, originalName)
|
||||||
cmd.Hidden = true
|
cmd.Hidden = true
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user