Is there a way to customise entire deprecate message for a command #1343
Labels
area/lib
Methods and functions that exist in the cobra library and consumed by users
kind/feature
A feature request for cobra; new or enhanced behavior
If we are using two commands together in a cli, eg:
apictl list apis -e dev
(listCmd added to RootCmd and listAPIsCmd added to listCmd). we are deprecating the middle commandlist
and replace it withget
eg:apictl get apis -e dev
.First I marked the
list
as the Deprecated command. However this doesn't print the deprecate message when we usedapictl list apis
. It will print deprecate only if we usedapictl list
.When we added the deprecate message to both listCmd and listApisCmd, then the message for listApisCmd is print as follows.
Command "apis" is deprecated, <message>
. First part of the message default prints the last command in the chain and my requirement is not deprecating the last command, but the previous command.Is there a way to achieve this or customise the entire deprecate message?
The text was updated successfully, but these errors were encountered: