From d690b47f97168f140142065f0846b47b3197dffa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 10 Jan 2023 01:25:50 +0000 Subject: [PATCH] Config inspection: --dump-config experimental option This is going to go away, actually, since I don't like it. Signed-off-by: Ian Jackson --- client/client.rs | 9 +++++++++ 1 file changed, 9 insertions(+) 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 { -- 2.30.2