Skip to content

Commit

Permalink
Update help
Browse files Browse the repository at this point in the history
  • Loading branch information
ztroop committed Mar 6, 2024
1 parent 5068d43 commit cc4b63e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Usage: echoserve [OPTIONS]
Options:
-p <PORT> Port number to listen on. (Default: 8080)
-a <ADDRESS> Address to listen on. (Default: 127.0.0.1)
-l <LATENCY> Simulated latency in milliseconds. (Default: 0)
-c <CONFIG> Optional path to a YAML configuration file.
-l <LATENCY> Simulated latency in milliseconds. (Default: 0)
-h, --help Print help
-V, --version Print version
```
Expand Down
4 changes: 4 additions & 0 deletions src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ use std::{collections::HashMap, fmt, time::Duration};
#[derive(Debug, Parser)]
#[command(version, about, long_about = None)]
pub struct Args {
#[clap(help = "Port number to listen on. (Default: 8080)")]
#[arg(short = 'p')]
pub port: Option<u16>,
#[clap(help = "Address to listen on. (Default: 127.0.0.1)")]
#[arg(short = 'a')]
pub address: Option<String>,
#[clap(help = "Optional path to a YAML configuration file.")]
#[arg(short = 'c')]
pub config: Option<String>,
#[clap(help = "Simulated latency in milliseconds. (Default: 0)")]
#[arg(short = 'l')]
pub latency: Option<u64>,
}
Expand Down

0 comments on commit cc4b63e

Please sign in to comment.