Add possible values for minimum TLS version in help message (#1693)

Follow up of https://github.com/lycheeverse/lychee/pull/1655
This commit is contained in:
Matthias Endler 2025-05-10 14:53:30 +02:00 committed by GitHub
parent fdf105c67a
commit ab27d6fee3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -396,6 +396,8 @@ Options:
--min-tls <MIN_TLS>
Minimum accepted TLS Version
[possible values: TLSv1_0, TLSv1_1, TLSv1_2, TLSv1_3]
--max-concurrency <MAX_CONCURRENCY>
Maximum number of concurrent network requests

View file

@ -47,7 +47,7 @@ const HELP_MSG_CONFIG_FILE: &str = formatcp!(
const TIMEOUT_STR: &str = concatcp!(DEFAULT_TIMEOUT_SECS);
const RETRY_WAIT_TIME_STR: &str = concatcp!(DEFAULT_RETRY_WAIT_TIME_SECS);
#[derive(Debug, Display, Deserialize, Default, Clone, EnumString)]
#[derive(Debug, Deserialize, Default, Clone, Display, EnumIter, EnumString, VariantNames)]
#[non_exhaustive]
pub(crate) enum TlsVersion {
#[serde(rename = "TLSv1_0")]
@ -349,7 +349,7 @@ and 501."
pub(crate) max_retries: u64,
/// Minimum accepted TLS Version
#[arg(long)]
#[arg(long, value_parser = PossibleValuesParser::new(TlsVersion::VARIANTS).map(|s| s.parse::<TlsVersion>().unwrap()))]
#[serde(default)]
pub(crate) min_tls: Option<TlsVersion>,