models/rule.go
func NewRule(name string, match string) (*Rule, error) {
	matchRegexp, err := regexp.Compile("(?i)" + match)
	if err != nil {
		return nil, err
	}
	if err != nil {
		fmt.Println(err)
	}

	r := &Rule{
		Enabled: false,
		Name:    name,
		Match:   matchRegexp,
	}
	return r, nil
}
func NewRule(name string, match string) (*Rule, error) {
	matchRegexp, err := regexp.Compile("(?i)" + match)
	if err != nil {
		return nil, err
	}
	if err != nil {
		fmt.Println(err)
	}

	r := &Rule{
		Enabled: false,
		Name:    name,
		Match:   matchRegexp,
	}
	return r, nil
}
// NewRule creates a new rule.