libplugin: allow commands and options to mark themselves deprecated.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-08-06 10:00:51 +09:30
parent 7a7a849fc2
commit fc097b8b48
4 changed files with 63 additions and 3 deletions

View File

@@ -106,6 +106,14 @@ static const struct plugin_command commands[] = { {
"Makes a simple getinfo call, to test rpc socket.",
"",
json_testrpc,
},
{
"testrpc-deprecated",
"utils",
"Makes a simple getinfo call, to test rpc socket.",
"",
json_testrpc,
true,
}
};
@@ -131,5 +139,9 @@ int main(int argc, char *argv[])
"string",
"Who to say hello to.",
charp_option, &name_option),
plugin_option_deprecated("name-deprecated",
"string",
"Who to say hello to.",
charp_option, &name_option),
NULL);
}