mirror of
https://github.com/coredns/coredns.git
synced 2026-05-26 11:50:24 -04:00
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:
@@ -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++
|
||||
|
||||
Reference in New Issue
Block a user