mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
cleanup code by lint (#3312)
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
This commit is contained in:
committed by
Miek Gieben
parent
f2df37a1fe
commit
8af4685587
@@ -59,9 +59,7 @@ func (r *ResponseReverter) WriteMsg(res *dns.Msg) error {
|
||||
s := rule.Replacement
|
||||
for groupIndex, groupValue := range regexGroups {
|
||||
groupIndexStr := "{" + strconv.Itoa(groupIndex) + "}"
|
||||
if strings.Contains(s, groupIndexStr) {
|
||||
s = strings.Replace(s, groupIndexStr, groupValue, -1)
|
||||
}
|
||||
s = strings.Replace(s, groupIndexStr, groupValue, -1)
|
||||
}
|
||||
name = s
|
||||
isNameRewritten = true
|
||||
|
||||
Reference in New Issue
Block a user