prevent breaking changes
This commit is contained in:
parent
2bfddea955
commit
e039031c22
8
rule.go
8
rule.go
|
@ -158,10 +158,18 @@ func (cc *Conn) ReplaceRule(r *Rule) *Rule {
|
|||
}
|
||||
|
||||
func (cc *Conn) AddRule(r *Rule) *Rule {
|
||||
if r.Handle != 0 {
|
||||
return cc.newRule(r, operationReplace)
|
||||
}
|
||||
|
||||
return cc.newRule(r, operationAdd)
|
||||
}
|
||||
|
||||
func (cc *Conn) InsertRule(r *Rule) *Rule {
|
||||
if r.Handle != 0 {
|
||||
return cc.newRule(r, operationReplace)
|
||||
}
|
||||
|
||||
return cc.newRule(r, operationInsert)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue