优化代码

This commit is contained in:
GoEdgeLab
2022-09-18 16:18:31 +08:00
parent 994f7c097b
commit 1fff989ad3
19 changed files with 10 additions and 115 deletions
+1 -1
View File
@@ -528,7 +528,7 @@ func (this *Rule) Test(value interface{}) bool {
if ip == nil {
return false
}
return this.isIP && bytes.Compare(this.ipValue, ip) == 0
return this.isIP && bytes.Equal(this.ipValue, ip)
case RuleOperatorGtIP:
ip := net.ParseIP(types.String(value))
if ip == nil {