From 13c82754ff6ef7ae995f32220ab9b2911a9933c5 Mon Sep 17 00:00:00 2001 From: Skyxim Date: Mon, 14 Mar 2022 21:43:58 +0800 Subject: [PATCH] [Fixed] show rule count when parse failed --- rule/provider/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rule/provider/provider.go b/rule/provider/provider.go index ca6468a9..2befc694 100644 --- a/rule/provider/provider.go +++ b/rule/provider/provider.go @@ -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 }