Skip to content

Commit

Permalink
fixed clap group names
Browse files Browse the repository at this point in the history
  • Loading branch information
jstuczyn committed Sep 9, 2024
1 parent 43b0b3e commit 04a2f59
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn parse_encoded_signatures_data(raw: &str) -> bs58::decode::Result<Vec<u8>> {
#[cfg_attr(feature = "cli", derive(clap::Args))]
#[cfg_attr(feature = "cli",
clap(
group(clap::ArgGroup::new("signatures_data").required(true)),
group(clap::ArgGroup::new("sig_data").required(true)),
))
]
pub struct CommonClientImportCoinIndexSignaturesArgs {
Expand All @@ -26,11 +26,11 @@ pub struct CommonClientImportCoinIndexSignaturesArgs {
pub(crate) client_config: PathBuf,

/// Explicitly provide the encoded signatures data (as base58)
#[cfg_attr(feature = "cli", clap(long, group = "signatures_data", value_parser = parse_encoded_signatures_data))]
#[cfg_attr(feature = "cli", clap(long, group = "sig_data", value_parser = parse_encoded_signatures_data))]
pub(crate) signatures_data: Option<Vec<u8>>,

/// Specifies the path to file containing binary signatures data
#[cfg_attr(feature = "cli", clap(long, group = "signatures_data"))]
#[cfg_attr(feature = "cli", clap(long, group = "sig_data"))]
pub(crate) signatures_path: Option<PathBuf>,

// currently hidden as there exists only a single serialization standard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn parse_encoded_signatures_data(raw: &str) -> bs58::decode::Result<Vec<u8>> {
#[cfg_attr(feature = "cli", derive(clap::Args))]
#[cfg_attr(feature = "cli",
clap(
group(clap::ArgGroup::new("signatures_data").required(true)),
group(clap::ArgGroup::new("sig_data").required(true)),
))
]
pub struct CommonClientImportExpirationDateSignaturesArgs {
Expand All @@ -26,11 +26,11 @@ pub struct CommonClientImportExpirationDateSignaturesArgs {
pub(crate) client_config: PathBuf,

/// Explicitly provide the encoded signatures data (as base58)
#[cfg_attr(feature = "cli", clap(long, group = "signatures_data", value_parser = parse_encoded_signatures_data))]
#[cfg_attr(feature = "cli", clap(long, group = "sig_data", value_parser = parse_encoded_signatures_data))]
pub(crate) signatures_data: Option<Vec<u8>>,

/// Specifies the path to file containing binary signatures data
#[cfg_attr(feature = "cli", clap(long, group = "signatures_data"))]
#[cfg_attr(feature = "cli", clap(long, group = "sig_data"))]
pub(crate) signatures_path: Option<PathBuf>,

// currently hidden as there exists only a single serialization standard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn parse_encoded_key_data(raw: &str) -> bs58::decode::Result<Vec<u8>> {
#[cfg_attr(feature = "cli", derive(clap::Args))]
#[cfg_attr(feature = "cli",
clap(
group(clap::ArgGroup::new("key_data").required(true)),
group(clap::ArgGroup::new("key_data_group").required(true)),
))
]
pub struct CommonClientImportMasterVerificationKeyArgs {
Expand All @@ -26,11 +26,11 @@ pub struct CommonClientImportMasterVerificationKeyArgs {
pub(crate) client_config: PathBuf,

/// Explicitly provide the encoded key data (as base58)
#[cfg_attr(feature = "cli", clap(long, group = "key_data", value_parser = parse_encoded_key_data))]
#[cfg_attr(feature = "cli", clap(long, group = "key_data_group", value_parser = parse_encoded_key_data))]
pub(crate) key_data: Option<Vec<u8>>,

/// Specifies the path to file containing binary key data
#[cfg_attr(feature = "cli", clap(long, group = "key_data"))]
#[cfg_attr(feature = "cli", clap(long, group = "key_data_group"))]
pub(crate) key_path: Option<PathBuf>,

// currently hidden as there exists only a single serialization standard
Expand Down
6 changes: 3 additions & 3 deletions common/commands/src/ecash/import_coin_index_signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ fn parse_encoded_signatures_data(raw: &str) -> bs58::decode::Result<Vec<u8>> {

#[derive(Debug, Parser)]
#[clap(
group(ArgGroup::new("signatures_data").required(true)),
group(ArgGroup::new("sig_data").required(true)),
)]
pub struct Args {
/// Config file of the client that is supposed to use the signatures.
#[clap(long)]
pub(crate) client_config: PathBuf,

/// Explicitly provide the encoded signatures data (as base58)
#[clap(long, group = "signatures_data", value_parser = parse_encoded_signatures_data)]
#[clap(long, group = "sig_data", value_parser = parse_encoded_signatures_data)]
pub(crate) signatures_data: Option<Vec<u8>>,

/// Specifies the path to file containing binary signatures data
#[clap(long, group = "signatures_data")]
#[clap(long, group = "sig_data")]
pub(crate) signatures_path: Option<PathBuf>,

// currently hidden as there exists only a single serialization standard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ fn parse_encoded_signatures_data(raw: &str) -> bs58::decode::Result<Vec<u8>> {

#[derive(Debug, Parser)]
#[clap(
group(ArgGroup::new("signatures_data").required(true)),
group(ArgGroup::new("sig_data").required(true)),
)]
pub struct Args {
/// Config file of the client that is supposed to use the signatures.
#[clap(long)]
pub(crate) client_config: PathBuf,

/// Explicitly provide the encoded signatures data (as base58)
#[clap(long, group = "signatures_data", value_parser = parse_encoded_signatures_data)]
#[clap(long, group = "sig_data", value_parser = parse_encoded_signatures_data)]
pub(crate) signatures_data: Option<Vec<u8>>,

/// Specifies the path to file containing binary signatures data
#[clap(long, group = "signatures_data")]
#[clap(long, group = "sig_data")]
pub(crate) signatures_path: Option<PathBuf>,

// currently hidden as there exists only a single serialization standard
Expand Down
6 changes: 3 additions & 3 deletions common/commands/src/ecash/import_master_verification_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ fn parse_encoded_key_data(raw: &str) -> bs58::decode::Result<Vec<u8>> {

#[derive(Debug, Parser)]
#[clap(
group(ArgGroup::new("key_data").required(true)),
group(ArgGroup::new("key_data_group").required(true)),
)]
pub struct Args {
/// Config file of the client that is supposed to use the key.
#[clap(long)]
pub(crate) client_config: PathBuf,

/// Explicitly provide the encoded key data (as base58)
#[clap(long, group = "key_data", value_parser = parse_encoded_key_data)]
#[clap(long, group = "key_data_group", value_parser = parse_encoded_key_data)]
pub(crate) key_data: Option<Vec<u8>>,

/// Specifies the path to file containing binary key data
#[clap(long, group = "key_data")]
#[clap(long, group = "key_data_group")]
pub(crate) key_path: Option<PathBuf>,

// currently hidden as there exists only a single serialization standard
Expand Down

0 comments on commit 04a2f59

Please sign in to comment.