Add command line help

This commit is contained in:
Andrey Golovizin 2021-06-29 23:20:50 +02:00
parent 12a9965f10
commit ba72ca72e9

View file

@ -11,6 +11,7 @@ const BASE_URL: &str = "https://api.azirevpn.com/v1";
#[derive(Clap, Debug)] #[derive(Clap, Debug)]
struct Opts { struct Opts {
/// Enables JSON output
#[clap(short, long)] #[clap(short, long)]
json: bool, json: bool,
@ -27,8 +28,13 @@ struct ConfigOpts {
#[derive(Clap, Debug)] #[derive(Clap, Debug)]
enum Command { enum Command {
/// Prints the list of VPN endpoints
Endpoints, Endpoints,
/// Prints WireGuard config
Config(ConfigOpts), Config(ConfigOpts),
/// Checks connection status
Check, Check,
} }