git.delta.rocks / jrsonnet / refs/commits / 90d4f174b1fa

difftreelog

fix arg group is incompatible with defaults

Yaroslav Bolyukin2021-03-27parent: #9e6e925.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-cli/src/manifest.rsdiffbeforeafterboth
23}23}
2424
25#[derive(Clap)]25#[derive(Clap)]
26#[clap(group = clap::ArgGroup::new("output_format"), help_heading = "MANIFESTIFICATION OUTPUT")]26#[clap(help_heading = "MANIFESTIFICATION OUTPUT")]
27pub struct ManifestOpts {27pub struct ManifestOpts {
28 /// Output format, wraps resulting value to corresponding std.manifest call.28 /// Output format, wraps resulting value to corresponding std.manifest call.
29 /// If set to `string` then plain string value is expected to be returned,29 /// If set to `string` then plain string value is expected to be returned,
30 /// otherwise output will be serialized to the specified format.30 /// otherwise output will be serialized to the specified format.
31 #[clap(long, short = 'f', default_value = "json", possible_values = &["string", "json", "yaml"]/*, group = "output_format"*/)]31 #[clap(long, short = 'f', default_value = "json", possible_values = &["string", "json", "yaml"])]
32 format: ManifestFormatName,32 format: ManifestFormatName,
33 /// Expect plain string as output.33 /// Expect plain string as output.
34 /// Shortcut for `--format=string` thus this option is mutually exclusive with `format` option.34 /// Shortcut for `--format=string` thus this option is mutually exclusive with `format` option.
35 #[clap(long, short = 'S', group = "output_format")]35 #[clap(long, short = 'S')]
36 string: bool,36 string: bool,
37 /// Write output as YAML stream, can be used with --format json/yaml37 /// Write output as YAML stream, can be used with --format json/yaml
38 #[clap(long, short = 'y')]38 #[clap(long, short = 'y')]
39 yaml_stream: bool,39 yaml_stream: bool,
40 /// Number of spaces to pad output manifest with.40 /// Number of spaces to pad output manifest with.
41 /// `0` for hard tabs, `-1` for single line output/41 /// `0` for hard tabs, `-1` for single line output
42 #[clap(long, default_value = "3")]42 #[clap(long, default_value = "3")]
43 line_padding: usize,43 line_padding: usize,
44}44}