Mark deprecated info in short description of deprecated commands.

pull/6/head
xiangpengzhao 2017-05-30 15:43:50 +08:00
parent cc432dbc77
commit 7092307f5e
No known key found for this signature in database
GPG Key ID: A9FD03A856417C5B
1 changed files with 1 additions and 0 deletions

View File

@ -401,6 +401,7 @@ func deprecatedAlias(deprecatedVersion string, cmd *cobra.Command) *cobra.Comman
cmd.Use = deprecatedVersion
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
return cmd
}