Skip to content

Commit

Permalink
Merge pull request #22 from nrdxp/hash-set-records
Browse files Browse the repository at this point in the history
Hash set records
  • Loading branch information
nrdxp authored Sep 20, 2023
2 parents 5a8667d + 1c2208b commit 2f8363c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ use clap_verbosity_flag::{InfoLevel, Verbosity};
use cloudflare::framework::{
async_api::Client, auth::Credentials, Environment, HttpApiClientConfig,
};
use std::collections::HashSet;

fn parse_records(args: &str) -> Result<HashSet<String>> {
Ok(args.split(',').map(|s| s.into()).collect())
}

#[derive(Debug, Parser)]
#[clap(author, version, about)]
Expand All @@ -14,9 +19,9 @@ pub struct Cli {
short,
env = "CLOUDFLARE_RECORDS",
value_name = "RECORDS",
value_delimiter(',')
value_parser(parse_records)
)]
pub records: Vec<String>,
pub records: HashSet<String>,
/// recommended: The CloudFlare API token to authenticate with
#[clap(
long,
Expand Down

0 comments on commit 2f8363c

Please sign in to comment.