[Fixed] show rule count when parse failed
This commit is contained in:
parent
002163f07b
commit
13c82754ff
1 changed files with 1 additions and 1 deletions
|
@ -124,12 +124,12 @@ func NewRuleSetProvider(name string, behavior P.RuleType, interval time.Duration
|
||||||
|
|
||||||
onUpdate := func(elm interface{}) error {
|
onUpdate := func(elm interface{}) error {
|
||||||
rulesRaw := elm.([]string)
|
rulesRaw := elm.([]string)
|
||||||
rp.count = len(rulesRaw)
|
|
||||||
rules, err := constructRules(rp.behavior, rulesRaw)
|
rules, err := constructRules(rp.behavior, rulesRaw)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rp.count = len(rulesRaw)
|
||||||
rp.setRules(rules)
|
rp.setRules(rules)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue