cli: migrate from gumdrop to clap v3 (#379)

`gumdrop` was originally chosen for its minimalist set of dependencies,
but `clap` v3 has a slimmed down set of dependencies and better UX.
This commit is contained in:
Tony Arcieri (iqlusion)
2022-05-24 21:45:26 -06:00
committed by GitHub
parent bb80551324
commit fab9d25b0a
6 changed files with 120 additions and 102 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
//! List detected readers
use crate::terminal::STDOUT;
use gumdrop::Options;
use clap::Parser;
use std::{
io::{self, Write},
process::exit,
@@ -10,7 +10,7 @@ use termcolor::{ColorSpec, StandardStreamLock, WriteColor};
use yubikey::{Context, Serial};
/// The `readers` subcommand
#[derive(Debug, Options)]
#[derive(Debug, Parser)]
pub struct ReadersCmd {}
impl ReadersCmd {
+2 -2
View File
@@ -1,7 +1,7 @@
//! Print device status
use crate::terminal::{print_cert_info, STDOUT};
use gumdrop::Options;
use clap::Parser;
use std::io::{self, Write};
use termcolor::{ColorSpec, StandardStreamLock, WriteColor};
use yubikey::{piv::*, YubiKey};
@@ -10,7 +10,7 @@ use yubikey::{piv::*, YubiKey};
const NONE_STR: &str = "<none>";
/// The `status` subcommand
#[derive(Debug, Options)]
#[derive(Debug, Parser)]
pub struct StatusCmd {}
impl StatusCmd {