Skip to content

Commit

Permalink
use pointer instead
Browse files Browse the repository at this point in the history
  • Loading branch information
blotus committed Dec 4, 2023
1 parent 6c45fc2 commit 23eef9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions internal/corazawaf/waf.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,3 @@ func (w *WAF) Validate() error {

return nil
}

func (w *WAF) GetRuleGroup() RuleGroup {
return w.Rules
}
6 changes: 3 additions & 3 deletions waf.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type WAF interface {
// NewTransaction Creates a new initialized transaction for this WAF instance
NewTransaction() types.Transaction
NewTransactionWithID(id string) types.Transaction
GetRuleGroup() corazawaf.RuleGroup
GetRuleGroup() *corazawaf.RuleGroup
}

// NewWAF creates a new WAF instance with the provided configuration.
Expand Down Expand Up @@ -125,6 +125,6 @@ func (w wafWrapper) NewTransactionWithID(id string) types.Transaction {
return w.waf.NewTransactionWithID(id)
}

func (w wafWrapper) GetRuleGroup() corazawaf.RuleGroup {
return w.waf.Rules
func (w wafWrapper) GetRuleGroup() *corazawaf.RuleGroup {
return &w.waf.Rules
}

0 comments on commit 23eef9b

Please sign in to comment.