Chore: print origin rule when format error (#92)

This commit is contained in:
gVisor bot 2019-01-14 10:35:11 +08:00
parent df830dd157
commit 3b75395670

View file

@ -324,7 +324,7 @@ func parseRules(cfg *rawConfig) ([]C.Rule, error) {
payload = rule[1] payload = rule[1]
target = rule[2] target = rule[2]
default: default:
return nil, fmt.Errorf("Rules[%d] error: format invalid", idx) return nil, fmt.Errorf("Rules[%d] [- %s] error: format invalid", idx, line)
} }
rule = trimArr(rule) rule = trimArr(rule)