summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-08-25 19:33:11 -0700
committerBryan Newbold <bnewbold@archive.org>2020-08-25 19:33:11 -0700
commitf6e1f6bddde40f34c84188002189366ed4cd8646 (patch)
treec3a28a12e0c52480f26d47e83374c12b67f38b52 /src
parentf3b190a487d69729643d198aff673727fcc2e7a1 (diff)
downloades-public-proxy-f6e1f6bddde40f34c84188002189366ed4cd8646.tar.gz
es-public-proxy-f6e1f6bddde40f34c84188002189366ed4cd8646.zip
bundle an example config file in the executable
Diffstat (limited to 'src')
-rw-r--r--src/main.rs4
1 files changed, 4 insertions, 0 deletions
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,
_ => {