mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
local control flow cleanup (#1215)
removed redundant/unreachable returns, else branches, type declarations, unused variables
This commit is contained in:
parent
d5f17ee377
commit
ad28a979e9
30 changed files with 187 additions and 242 deletions
|
@ -443,7 +443,7 @@ func DumpTree(parser_results ParserResults, bucket_pour BucketPourInfo, opts Dum
|
|||
fmt.Printf("\t├ Scenarios\n")
|
||||
}
|
||||
bnames := make([]string, 0, len(state[tstamp]["buckets"]))
|
||||
for k, _ := range state[tstamp]["buckets"] {
|
||||
for k := range state[tstamp]["buckets"] {
|
||||
//there is a trick : to know if an event succesfully exit the parsers, we check if it reached the pour() phase
|
||||
//we thus use a fake stage "buckets" and a fake parser "OK" to know if it entered
|
||||
if k == "OK" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue