mirror of
https://github.com/containers/youki
synced 2024-11-23 09:21:57 +01:00
Remove version & author from each subcommand
Currently every individual subcommand of youki has clap attributes giving the youki version and authors. That seems a bit redundant, since this information is also on the top level Opts structure. Having the tags on each does have an effect though: it means that, e.g. "youki create --help" will give the version and author, as well as plain "youki --help". Likewise "youki create --version" will give a result as well as "youki --version". Including this is of limited value, though, since it can be easily obtained from the top level command. It also provides a barrier to splitting out the frontend argument parsing from the rest of youki, so remove it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
09d9fae8cd
commit
88ea432b92
@ -48,35 +48,22 @@ struct Opts {
|
||||
// Also for a short information, check [runc commandline documentation](https://github.com/opencontainers/runc/blob/master/man/runc.8.md)
|
||||
#[derive(Parser, Debug)]
|
||||
enum SubCommand {
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Create(liboci_cli::Create),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Start(liboci_cli::Start),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
State(liboci_cli::State),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Kill(liboci_cli::Kill),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Delete(liboci_cli::Delete),
|
||||
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Events(liboci_cli::Events),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Exec(liboci_cli::Exec),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
List(liboci_cli::List),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Pause(liboci_cli::Pause),
|
||||
#[clap(version = crate_version!(), author = "youki team", setting=clap::AppSettings::AllowLeadingHyphen)]
|
||||
#[clap(setting=clap::AppSettings::AllowLeadingHyphen)]
|
||||
Ps(liboci_cli::Ps),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Resume(liboci_cli::Resume),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Run(liboci_cli::Run),
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Spec(liboci_cli::Spec),
|
||||
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Info(info::Info),
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user