From b3fc6556e4d59e00d360f7fd8035e606a032603b Mon Sep 17 00:00:00 2001 From: Alexander Campbell Date: Fri, 19 May 2017 07:42:15 -0700 Subject: [PATCH] kubectl: improve docstring on deprecatedCmd --- pkg/kubectl/cmd/cmd.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index 67f5ab5d342..4d41dc7af49 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -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) } -// Create a constructor for a command that redirects to another command, but -// first prints a deprecation message. +// deprecatedCmd is intended to be used to create a "wrapper" command around an +// existing command. The wrapper works the same but prints a deprecation +// message before running. func deprecatedCmd(deprecatedVersion string, cmd *cobra.Command) *cobra.Command { // Have to be careful here because Cobra automatically extracts the name // of the command from the .Use field.