feat(utils/format): adding the format_sanction module
This commit is contained in:
parent
e388ddfc8c
commit
3385bb3660
1 changed files with 6 additions and 0 deletions
6
src/utils/format.rs
Normal file
6
src/utils/format.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
pub fn format_sanction_reason(module_name:&str, reason: Option<&str>, executor: &str) -> String {
|
||||||
|
match reason {
|
||||||
|
Some(s) => format!("[TTY {}] {} by {}", module_name, s, executor),
|
||||||
|
None => format!("[TTY {}] by {}", module_name, executor)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue