build(ariadne): vendor clap

This commit was merged in pull request #30.
This commit is contained in:
alexion committed 2026-09-08 19:48:37 -04:00
1 parent e6af135702
commit 8855b6d379
681 files changed
+400416

No files matched your search

@@ -0,0 +1,17 @@
use clap::Command;
fn main() {
let cmd = Command::new(env!("CARGO_CRATE_NAME"))
.multicall(true)
.arg_required_else_help(true)
.subcommand_value_name("APPLET")
.subcommand_help_heading("APPLETS")
.subcommand(Command::new("hostname").about("show hostname part of FQDN"))
.subcommand(Command::new("dnsdomainname").about("show domain name part of FQDN"));
match cmd.get_matches().subcommand_name() {
Some("hostname") => println!("www"),
Some("dnsdomainname") => println!("example.com"),
_ => unreachable!("parser should ensure only valid subcommand names are used"),
}
}