harmont_cli/output/
status.rs1#![allow(
2 clippy::print_stdout,
3 clippy::print_stderr,
4 reason = "this module is the centralised print sink for the CLI"
5)]
6
7use owo_colors::OwoColorize;
8
9pub fn print_success(msg: &str) {
11 let check = format!("{}", "\u{2714}".green().bold());
12 println!("{check} {msg}");
13}
14
15pub fn print_warning(msg: &str) {
17 let bang = format!("{}", "!".yellow().bold());
18 eprintln!("{bang} {msg}");
19}
20
21pub fn print_error(msg: &str) {
23 let cross = format!("{}", "\u{2718}".red().bold());
24 eprintln!("{cross} {msg}");
25}
26
27pub fn print_info(msg: &str) {
29 let arrow = format!("{}", "\u{25b6}".cyan());
30 println!("{arrow} {msg}");
31}