pub fn is_sorted(cmd: &Command) -> Result<(), String>Expand description
Checks if subcommands are sorted, returning a Result instead of panicking.
ยงExample
use clap::Command;
let cmd = Command::new("mycli");
match clap_sort::is_sorted(&cmd) {
Ok(()) => println!("Commands are sorted!"),
Err(msg) => eprintln!("Error: {}", msg),
}