prevent breaking changes

This commit is contained in:
Alexis PIRES 2019-12-25 13:31:49 +01:00
parent 2bfddea955
commit e039031c22
1 changed files with 8 additions and 0 deletions

View File

@ -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)
}