1#[macro_export]
3macro_rules! info {
4 ($($arg:tt)*) => {{
5 println!($($arg)*)
6 }};
7}
8
9#[macro_export]
11macro_rules! error {
12 ($($arg:tt)*) => {{
13 use colored::Colorize;
14 eprint!("{}", "[ERROR] ".red());
15 eprintln!($($arg)*)
16 }};
17}
18
19#[macro_export]
21macro_rules! usage {
22 ($($arg:tt)*) => {{
23 use colored::Colorize;
24 print!("{}", "💡 Usage: ".green());
25 println!($($arg)*)
26 }};
27}
28
29#[macro_export]
31macro_rules! debug_log {
32 ($config:expr, $($arg:tt)*) => {{
33 if $config.is_verbose() {
34 println!($($arg)*)
35 }
36 }};
37}
38
39#[allow(dead_code)]
41pub fn print_line() {
42 println!("- - - - - - - - - - - - - - - - - - - - - - -");
43}
44
45pub fn capitalize_first_letter(s: &str) -> String {
47 let mut chars = s.chars();
48 match chars.next() {
49 None => String::new(),
50 Some(c) => c.to_uppercase().collect::<String>() + chars.as_str(),
51 }
52}