From f6e1f6bddde40f34c84188002189366ed4cd8646 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 25 Aug 2020 19:33:11 -0700 Subject: bundle an example config file in the executable --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 0f94a84..342836f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -75,6 +75,10 @@ fn load_config() -> ProxyConfig { println!("{}", usage()); std::process::exit(0); } + [_, "--example-config"] => { + println!("{}", include_str!("../example_config.toml")); + std::process::exit(0); + }, [_, "--config", p] => config_path = Some(p.to_string()), [_, "--allow-all-indices"] => allow_all_indices = true, _ => { -- cgit v1.2.3