Add inline rule-set & Add reload for local rule-set

This commit is contained in:
世界
2024-09-08 10:10:11 +08:00
parent d5b79fe817
commit 6b0f4105f7
14 changed files with 311 additions and 280 deletions
+4 -1
View File
@@ -61,7 +61,10 @@ func upgradeRuleSet(sourcePath string) error {
log.Info("already up-to-date")
return nil
}
plainRuleSet := plainRuleSetCompat.Upgrade()
plainRuleSet, err := plainRuleSetCompat.Upgrade()
if err != nil {
return err
}
buffer := new(bytes.Buffer)
encoder := json.NewEncoder(buffer)
encoder.SetIndent("", " ")