Skip to content

Commit

Permalink
fix: not_regex copy
Browse files Browse the repository at this point in the history
  • Loading branch information
loeffel-io committed Nov 19, 2024
1 parent 5b5a853 commit 2c8b91d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/rule/not_regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func (rule *NotRegex) SetParameters(params []string) error {
defer rule.Unlock()

if len(params) == 0 {
return fmt.Errorf("regex pattern not exists")
return fmt.Errorf("not_regex pattern not exists")
}

if params[0] == "" {
return fmt.Errorf("regex pattern is empty")
return fmt.Errorf("not_regex pattern is empty")
}

rule.regexPattern = params[0]
Expand Down Expand Up @@ -77,7 +77,7 @@ func (rule *NotRegex) Copy() Rule {
rule.RLock()
defer rule.RUnlock()

c := new(Regex)
c := new(NotRegex)
c.Init()
c.regexPattern = rule.regexPattern

Expand Down

0 comments on commit 2c8b91d

Please sign in to comment.