1use clap::{Command, crate_version};
2
3mod extract;
4
5pub fn run() {
6 let app = app();
7 let matches = app.get_matches();
8
9 match matches.subcommand() {
10 Some(("extract", matches)) => extract::execute(matches),
11 _ => unreachable!(),
12 }
13}
14
15fn app() -> Command {
16 Command::new("cargo")
17 .bin_name("cargo")
18 .version(crate_version!())
19 .long_version(crate_version!())
20 .about("Extracts information found in Cargo.toml")
21 .subcommand_required(true)
22 .arg_required_else_help(true)
23 .subcommand(extract::command())
24}