#![forbid(unsafe_code)]
use std::process::ExitCode;
const HELP: &str = "\
lockfiles: multi-ecosystem lockfile parser (work in progress)
Usage:
lockfiles [OPTIONS]
Options:
-h, --help Print this help
-V, --version Print version
No parsing commands are available yet; the name is reserved while the
implementation is developed.
";
fn main() -> ExitCode {
match std::env::args().nth(1).as_deref() {
Some("-V" | "--version") => {
println!("lockfiles {}", lockfiles::version());
ExitCode::SUCCESS
}
None | Some("-h" | "--help") => {
print!("{HELP}");
ExitCode::SUCCESS
}
Some(other) => {
eprintln!("error: unexpected argument '{other}'");
eprintln!("try 'lockfiles --help'");
ExitCode::from(2)
}
}
}