Feature/emessageformat#62 (#64)

* add struct to alert error message refs #62

* add pub to call module #62
This commit is contained in:
Alan Smithee
2021-03-11 20:04:51 +09:00
committed by GitHub
parent 194e554624
commit f594bb1432
+8
View File
@@ -20,6 +20,8 @@ pub struct DetectInfo {
pub detail: String,
}
pub struct AlertMessage {}
lazy_static! {
pub static ref MESSAGES: Mutex<Message> = Mutex::new(Message::new());
}
@@ -141,6 +143,12 @@ impl Message {
}
}
impl AlertMessage {
pub fn alert(contents: String) {
println!("[ERROR] {}", contents);
}
}
#[cfg(test)]
mod tests {
use crate::detections::print::Message;