fix(example): args parser
This commit is contained in:
parent
1d6e22238c
commit
fa7626b78a
1 changed files with 3 additions and 2 deletions
|
@ -9,10 +9,11 @@ async fn main() -> Result<(), tokio_gemini::LibError> {
|
|||
let mut args = std::env::args();
|
||||
let mut insecure = false;
|
||||
let mut url = "gemini://geminiprotocol.net/".to_owned();
|
||||
if let Some(arg) = args.nth(1) {
|
||||
_ = args.next(); // skip exe path
|
||||
if let Some(arg) = args.next() {
|
||||
if arg == "-k" {
|
||||
insecure = true;
|
||||
if let Some(arg) = args.nth(2) {
|
||||
if let Some(arg) = args.next() {
|
||||
url = arg;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue