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

This commit is contained in:
世界
2024-06-26 00:43:51 +08:00
parent 6bebe2483b
commit 3a7acaa92a
14 changed files with 311 additions and 280 deletions

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("", " ")