-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
obfuscation is now turnoffable #20
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,10 @@ struct CliArgs { | |
#[clap(long, env, value_parser)] | ||
blaze_url: Uri, | ||
|
||
/// Should the results not be obfuscated | ||
#[clap(long, env, value_parser)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't you want to set default value == false (meaning "yes, obfuscate?) negations are confusing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the parameter is not present, it is false, no default needed |
||
do_not_obfuscate: bool, | ||
|
||
/// Outgoing HTTP proxy: Directory with CA certificates to trust for TLS connections (e.g. /etc/samply/cacerts/) | ||
#[clap(long, env, value_parser)] | ||
tls_ca_certificates_dir: Option<PathBuf>, | ||
|
@@ -53,6 +57,7 @@ pub(crate) struct Config { | |
pub api_key: String, | ||
pub retry_count: usize, | ||
pub blaze_url: Uri, | ||
pub do_not_obfuscate: bool, | ||
tls_ca_certificates: Vec<Certificate>, | ||
pub client: Client, | ||
} | ||
|
@@ -71,6 +76,7 @@ impl Config { | |
api_key: cli_args.api_key, | ||
retry_count: cli_args.retry_count, | ||
blaze_url: cli_args.blaze_url, | ||
do_not_obfuscate: cli_args.do_not_obfuscate, | ||
tls_ca_certificates, | ||
client | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please give values for on / off.
Consider using a positive variable (negations are confusing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't work with boolean.
clap-rs/clap#1649
Do you want it to be a string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprising but then I'm fine with it