Remove redundant code (#8072)

Signed-off-by: Yang Jun <yang.jun22@zte.com.cn>
Signed-off-by: 杨军10092085 <yang.jun22@zte.com.cn>
This commit is contained in:
JUN YANG
2026-05-22 03:11:29 +08:00
committed by GitHub
parent 65d15af3a9
commit 3e762bc603
2 changed files with 1 additions and 9 deletions

View File

@@ -371,10 +371,7 @@ func parseAnswerRules(name string, args []string) (auto bool, rules ResponseRule
}
for arg < len(args) {
if last == "" && args[arg] != AnswerMatch {
if last == "" {
return false, nil, fmt.Errorf("exceeded the number of arguments for a non-answer rule argument for %s rule", name)
}
return false, nil, fmt.Errorf("exceeded the number of arguments for %s answer rule for %s rule", last, name)
return false, nil, fmt.Errorf("exceeded the number of arguments for a non-answer rule argument for %s rule", name)
}
if args[arg] == AnswerMatch {
arg++