MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Init

Method Init

internal/waf/rule_group.go:27–39  ·  view source on GitHub ↗
(waf *WAF)

Source from the content-addressed store, hash-verified

25}
26
27func (this *RuleGroup) Init(waf *WAF) error {
28 this.hasRuleSets = len(this.RuleSets) > 0
29
30 if this.hasRuleSets {
31 for _, set := range this.RuleSets {
32 err := set.Init(waf)
33 if err != nil {
34 return fmt.Errorf("init set '%d' failed: %w", set.Id, err)
35 }
36 }
37 }
38 return nil
39}
40
41func (this *RuleGroup) AddRuleSet(ruleSet *RuleSet) {
42 this.RuleSets = append(this.RuleSets, ruleSet)

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.80
InitMethod · 0.65

Tested by

no test coverage detected