[Fixed] show rule count when parse failed

This commit is contained in:
Skyxim 2022-03-14 21:43:58 +08:00
parent 002163f07b
commit 13c82754ff

View File

@ -124,12 +124,12 @@ func NewRuleSetProvider(name string, behavior P.RuleType, interval time.Duration
onUpdate := func(elm interface{}) error {
rulesRaw := elm.([]string)
rp.count = len(rulesRaw)
rules, err := constructRules(rp.behavior, rulesRaw)
if err != nil {
return err
}
rp.count = len(rulesRaw)
rp.setRules(rules)
return nil
}