mirror of
https://github.com/jht5945/rust_util.git
synced 2025-12-27 07:30:05 +08:00
feat: add util_term
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "rust_util"
|
||||
version = "0.6.17"
|
||||
version = "0.6.18"
|
||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||
edition = "2018"
|
||||
description = "Hatter's Rust Util"
|
||||
|
||||
@@ -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`
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
6
src/util_term.rs
Normal file
6
src/util_term.rs
Normal file
@@ -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";
|
||||
Reference in New Issue
Block a user