diff options
| author | EnderByEndera <[email protected]> | 2021-01-21 20:29:33 +0800 |
|---|---|---|
| committer | EnderByEndera <[email protected]> | 2021-01-21 20:29:33 +0800 |
| commit | b31edbeb29f3b2ab1824337b611f876359934d86 (patch) | |
| tree | f937d3261a873f64413bbc7b0af2d536fa1bb9a5 /cmd/root.go | |
| parent | 8163ac337de99fda5688b37a36baa358092dfeb0 (diff) | |
1. simplify the model module, added more CRUD to mongodb
2. deleted logger.Debugf in startRouter
3. added rule_endpoint.go to set rule module' endpoint
Diffstat (limited to 'cmd/root.go')
| -rw-r--r-- | cmd/root.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/root.go b/cmd/root.go index 5612915..3c93ff0 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,7 +1,7 @@ /* * @Author: EnderByEndera * @Date: 2020-12-19 11:59:02 - * @LastEditTime: 2021-01-06 09:51:43 + * @LastEditTime: 2021-01-15 07:16:12 * @LastEditors: Please set LastEditors * @Description: root of the commdetection cmd * @FilePath: /commdetection/cmd/root.go @@ -89,8 +89,11 @@ func root() { go func() { for { - comms := comm.GetCommands() + var comms model.Commands + comms = comm.GetCommands() comms = comm.FlushCommands(comms, filters) + comms.InsertAllTo("test", "commands") + comms.GetCommandsFrom("test", "commands") css := rules.InitCommScores(comms) css = rules.EvaluateCommScore(css, rs) jsonBuf, _ := json.Marshal(css) |
