This repository has been archived on 2023-01-14. You can view files and clone it, but cannot push or open issues or pull requests.
toolkit/src/main.rs

22 lines
605 B
Rust
Raw Normal View History

2022-12-17 21:51:41 +01:00
use prereqs::prereqs_exec;
use util::Cmd;
mod prereqs;
fn main() -> eyre::Result<()> {
let matches = clap::Command::new("toolkit")
2022-12-17 22:56:07 +01:00
.subcommands([
prereqs::prereqs()?,
tldr::Tldr::cmd()?,
sourcegraph::Sourcegraph::cmd()?,
])
2022-12-17 21:51:41 +01:00
.get_matches();
match matches.subcommand() {
Some(("prereqs", subcmd)) => prereqs_exec(subcmd),
Some(("tldr", subcmd)) => tldr::Tldr::exec(subcmd),
2022-12-17 22:56:07 +01:00
Some(("sourcegraph", subcmd)) => sourcegraph::Sourcegraph::exec(subcmd),
2022-12-17 21:51:41 +01:00
_ => Err(eyre::anyhow!("no command selected!")),
}
}