From: Ian Jackson Date: Tue, 10 Jan 2023 01:25:50 +0000 (+0000) Subject: Config inspection: --dump-config experimental option X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=d690b47f97168f140142065f0846b47b3197dffa;p=hippotat.git Config inspection: --dump-config experimental option This is going to go away, actually, since I don't like it. Signed-off-by: Ian Jackson --- diff --git a/client/client.rs b/client/client.rs index c1acdd2..cf7a935 100644 --- a/client/client.rs +++ b/client/client.rs @@ -28,6 +28,9 @@ pub struct Opts { /// `link`: the link name including the `[ ]`. #[clap(long)] print_config: Option, + + #[clap(long, required(false))] + dump_config: bool, } type OutstandingRequest<'r> = Pin::parse(); let (ics,) = config::startup("hippotat", LinkEnd::Client, &opts.config, &opts.log, |ics| { + if opts.dump_config { + for ic in &ics { + println!("{:#?}", ic); + } + process::exit(0); + } if let Some(arg) = &opts.print_config { for ic in &ics { implement_print_config(arg, &|k| Some(match k {