clingwrap 0.7.0

types and functions to implement command line programs
Documentation
//! Show filenames for configuration files that would be loaded.

use clingwrap::config::ConfigLoader;

const QUAL: &str = "fi.liw.clingwrap";
const ORG: &str = "Lars Wirzenius";
const APP: &str = "clingwrap";

fn main() {
    let mut loader = ConfigLoader::default();
    loader.xdg(QUAL, ORG, APP);

    println!("Given:");
    println!("  qualifier {QUAL:?}",);
    println!("  organization {ORG:?}",);
    println!("  application {APP:?}",);
    println!("load these files:");
    for (filename, required) in loader.filenames() {
        println!("- {} (required={required})", filename.display());
    }
}