feat(utils/format): adding the format_sanction module

This commit is contained in:
Raphael 2026-03-16 14:03:54 +01:00
parent e388ddfc8c
commit 3385bb3660
No known key found for this signature in database

6
src/utils/format.rs Normal file
View 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)
}
}