Closed VergeDX closed 1 year ago
diff --git a/src/modules/mod.rs b/src/modules/mod.rs
index 664e710..aca3109 100644
--- a/src/modules/mod.rs
+++ b/src/modules/mod.rs
@@ -18,7 +18,7 @@ pub mod simcity;
pub mod weblog;
use async_trait::async_trait;
-use std::collections::HashMap;
+use std::collections::BTreeMap;
use crate::args::AppConfig;
@@ -30,8 +30,8 @@ pub trait Module: Sync {
}
lazy_static::lazy_static! {
- pub static ref ALL_MODULES: HashMap<&'static str, Box<dyn Module>> = {
- let mut all_modules: HashMap<&'static str, Box<dyn Module>> = HashMap::new();
+ pub static ref ALL_MODULES: BTreeMap<&'static str, Box<dyn Module>> = {
+ let mut all_modules: BTreeMap<&'static str, Box<dyn Module>> = BTreeMap::new();
all_modules.insert("ansible", Box::new(ansible::Ansible));
all_modules.insert("bootlog", Box::new(bootlog::Bootlog));
all_modules.insert("botnet", Box::new(botnet::Botnet));
Oh wow, never noticed! Wanna make a quick PR?
As the title says, module list output of
genact --help
orgenact --list-modules
is unordered,will change of each run. Also, I noticed the random module choice does not rely on
HashMap
's randomness.