Skip to content

Commit 2c8b91d

Browse files
committed
fix: not_regex copy
1 parent 5b5a853 commit 2c8b91d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/rule/not_regex.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ func (rule *NotRegex) SetParameters(params []string) error {
3434
defer rule.Unlock()
3535

3636
if len(params) == 0 {
37-
return fmt.Errorf("regex pattern not exists")
37+
return fmt.Errorf("not_regex pattern not exists")
3838
}
3939

4040
if params[0] == "" {
41-
return fmt.Errorf("regex pattern is empty")
41+
return fmt.Errorf("not_regex pattern is empty")
4242
}
4343

4444
rule.regexPattern = params[0]
@@ -77,7 +77,7 @@ func (rule *NotRegex) Copy() Rule {
7777
rule.RLock()
7878
defer rule.RUnlock()
7979

80-
c := new(Regex)
80+
c := new(NotRegex)
8181
c.Init()
8282
c.regexPattern = rule.regexPattern
8383

0 commit comments

Comments
 (0)