Skip to content

Commit

Permalink
cmdline args
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDarthShoe committed Jul 20, 2023
1 parent b8a54a4 commit 5104bf9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions client/examples/http_client.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use structopt::StructOpt;

use ya_relay_core::key::{load_or_generate, Protected};

Check failure on line 3 in client/examples/http_client.rs

View workflow job for this annotation

GitHub Actions / Tests (ubuntu-latest)

unused import: `load_or_generate`

#[derive(StructOpt)]
struct Cli {
#[structopt(long, env = "PORT")]
port: u16,

Check failure on line 8 in client/examples/http_client.rs

View workflow job for this annotation

GitHub Actions / Tests (ubuntu-latest)

fields `port`, `relay_addr`, `key_file`, and `key_password` are never read
#[structopt(long, env = "RELAY_ADDR")]
relay_addr: url::Url,
#[structopt(long, env = "CLIENT_KEY_FILE")]
key_file: String,
#[structopt(long, env = "CLIENT_KEY_PASSWORD", parse(from_str = Protected::from))]
key_password: Option<Protected>,
}

#[tokio::main(flavor = "current_thread")]
async fn main() {
let cli = Cli::from_args();

Check failure on line 19 in client/examples/http_client.rs

View workflow job for this annotation

GitHub Actions / Tests (ubuntu-latest)

unused variable: `cli`
}

0 comments on commit 5104bf9

Please sign in to comment.