Feature/emessageformat#62 (#64)
* add struct to alert error message refs #62 * add pub to call module #62
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user