mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 05:21:58 +00:00
kubectl: improve docstring on deprecatedCmd
This commit is contained in:
parent
9e7f29c3fb
commit
b3fc6556e4
@ -391,8 +391,9 @@ func printDeprecationWarning(command, alias string) {
|
|||||||
glog.Warningf("%s is DEPRECATED and will be removed in a future version. Use %s instead.", alias, command)
|
glog.Warningf("%s is DEPRECATED and will be removed in a future version. Use %s instead.", alias, command)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a constructor for a command that redirects to another command, but
|
// deprecatedCmd is intended to be used to create a "wrapper" command around an
|
||||||
// first prints a deprecation message.
|
// existing command. The wrapper works the same but prints a deprecation
|
||||||
|
// message before running.
|
||||||
func deprecatedCmd(deprecatedVersion string, cmd *cobra.Command) *cobra.Command {
|
func deprecatedCmd(deprecatedVersion string, cmd *cobra.Command) *cobra.Command {
|
||||||
// Have to be careful here because Cobra automatically extracts the name
|
// Have to be careful here because Cobra automatically extracts the name
|
||||||
// of the command from the .Use field.
|
// of the command from the .Use field.
|
||||||
|
Loading…
Reference in New Issue
Block a user