func (rg *RuleGroup) GetRules() []*Rule {
	rg.mux.RLock()
	defer rg.mux.RUnlock()
	return rg.rules
}
GetRules returns the slice of rules,
it's concurrent safe.
package coraza
import (
	"fmt"
	"strconv"
	"sync"
	"time"
	"github.com/jptosso/coraza-waf/utils"
	"go.uber.org/zap"
)
type RuleGroup struct {
	rules []*Rule
	mux   *sync.RWMutex
}
func (rg *RuleGroup) Add(rule *Rule) error {
	if rule == nil {
		return nil
	}
	if rg.FindById(rule.Id) != nil && rule.Id != 0 {
		return fmt.Errorf("there is a another rule with id %d", rule.Id)
	}
	rg.rules = append(rg.rules, rule)
	return nil
}