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

Method FindRuleGroupWithCode

internal/waf/waf.go:175–190  ·  view source on GitHub ↗
(ruleGroupCode string)

Source from the content-addressed store, hash-verified

173}
174
175func (this *WAF) FindRuleGroupWithCode(ruleGroupCode string) *RuleGroup {
176 if len(ruleGroupCode) == 0 {
177 return nil
178 }
179 for _, group := range this.Inbound {
180 if group.Code == ruleGroupCode {
181 return group
182 }
183 }
184 for _, group := range this.Outbound {
185 if group.Code == ruleGroupCode {
186 return group
187 }
188 }
189 return nil
190}
191
192func (this *WAF) MoveInboundRuleGroup(fromIndex int, toIndex int) {
193 if fromIndex < 0 || fromIndex >= len(this.Inbound) {

Callers 5

MergeTemplateMethod · 0.95
TestTemplateSQLInjectionFunction · 0.80
BenchmarkTemplateCC2Function · 0.80

Calls

no outgoing calls

Tested by 4

TestTemplateSQLInjectionFunction · 0.64
BenchmarkTemplateCC2Function · 0.64