diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..7ffec6d --- /dev/null +++ b/src/error.rs @@ -0,0 +1,8 @@ +use std::path::Path; + +pub fn print_error(message: String) { + let name = std::env::args().next().unwrap(); + let name = Path::new(&name).file_name().unwrap().to_str().unwrap(); + + eprintln!("{}: {}", name, message); +}