netsky 0.1.5

netsky CLI: the viable system launcher and subcommand dispatcher
//! Small terminal-format helpers for netsky CLI output.

use std::fmt::Display;

use owo_colors::OwoColorize;

pub fn print_version(name: &str, version: &str) {
    println!("{name} {}", version.bold());
}

pub fn print_error(error: impl Display) {
    eprintln!("{}", format!("error: {error}").red());
}

pub fn pass(text: &str) -> String {
    text.green().to_string()
}

pub fn fail(text: &str) -> String {
    text.red().to_string()
}

pub fn warn(text: &str) -> String {
    text.yellow().to_string()
}

pub fn bold(text: &str) -> String {
    text.bold().to_string()
}