knf-cli 0.1.1

Merge layered configuration files and print the result
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use clap::Parser;

fn main() {
    // clap handles --help/--version and exits 2 on usage errors.
    let cli = knf::cli::Cli::parse();

    if let Err(err) = knf::run(cli) {
        // Some errors (the null-in-TOML report, mixed-format, directory) are
        // deliberately multi-line and carry their own `help:` line.
        eprintln!("error: {err}");
        for cause in err.chain().skip(1) {
            eprintln!("  caused by: {cause}");
        }
        std::process::exit(1);
    }
}