Chore: remove forward compatibility code

This commit is contained in:
Dreamacro
2020-06-27 14:28:10 +08:00
parent 2781090405
commit 7c62fe41b4
5 changed files with 4 additions and 77 deletions

View File

@ -25,9 +25,6 @@ func ParseRule(tp, payload, target string, params []string) (C.Rule, error) {
case "IP-CIDR", "IP-CIDR6":
noResolve := HasNoResolve(params)
parsed, parseErr = NewIPCIDR(payload, target, WithIPCIDRNoResolve(noResolve))
// deprecated when bump to 1.0
case "SOURCE-IP-CIDR":
fallthrough
case "SRC-IP-CIDR":
parsed, parseErr = NewIPCIDR(payload, target, WithIPCIDRSourceIP(true), WithIPCIDRNoResolve(true))
case "SRC-PORT":
@ -35,9 +32,6 @@ func ParseRule(tp, payload, target string, params []string) (C.Rule, error) {
case "DST-PORT":
parsed, parseErr = NewPort(payload, target, false)
case "MATCH":
fallthrough
// deprecated when bump to 1.0
case "FINAL":
parsed = NewMatch(target)
default:
parseErr = fmt.Errorf("unsupported rule type %s", tp)