OpenGFW icon indicating copy to clipboard operation
OpenGFW copied to clipboard

feat: rule set loader

Open Aionw opened this issue 2 years ago • 2 comments

Add rule set loader, move original config loader routine into ruslet/loader.go

Aionw avatar Mar 02 '24 07:03 Aionw

Sorry but I don't see the point of this change. You are merely moving this function into a new struct with only one method. This is not abstraction - in fact it ends up with more lines and more fragmented code

tobyxdd avatar Mar 02 '24 18:03 tobyxdd

The basic idea here is to create a new component named RuleSetLoader which managed all ruleset update and can be selected by config file. Based on this component, we can add remote config to not only load config from local file. Besides, viper offers onConfigChange and customized reader, maybe it's better to use them to implement new RuleSetLoader?

Aionw avatar Mar 03 '24 04:03 Aionw