diff --git a/Cargo.toml b/Cargo.toml index f54ddf5..b37012f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust_util" -version = "0.6.17" +version = "0.6.18" authors = ["Hatter Jiang "] edition = "2018" description = "Hatter's Rust Util" diff --git a/README.md b/README.md index 275d6e5..7325df3 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ $ cargo run --example log ## Update Log +* Nov 28, 2020 v0.6.18 + * add util_term * Jun 21, 2020 v0.3.0 * add struct `JoinFilesReader` diff --git a/src/lib.rs b/src/lib.rs index 2879b75..6535085 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,6 +14,7 @@ pub mod util_size; pub mod util_file; pub mod util_time; pub mod util_net; +pub mod util_term; /// iff!(condition, result_when_true, result_when_false) #[macro_export] macro_rules! iff { diff --git a/src/util_term.rs b/src/util_term.rs new file mode 100644 index 0000000..7839e5e --- /dev/null +++ b/src/util_term.rs @@ -0,0 +1,6 @@ +pub const RED: &str = "\x1B[91m"; +pub const GREEN: &str = "\x1B[92m"; +pub const YELLOW: &str = "\x1B[93m"; +pub const BOLD: &str = "\x1B[1m"; +pub const UNDER: &str = "\x1B[4m"; +pub const END: &str = "\x1B[0m";