mirror of
https://github.com/coredns/coredns.git
synced 2026-04-05 11:45:33 -04:00
lint(revive): fix indent-error-flow violations (#7977)
This commit is contained in:
@@ -175,20 +175,19 @@ func (z *Zone) nameFromRight(qname string, i int) (string, bool) {
|
||||
|
||||
n := len(qname)
|
||||
for j := 1; j <= z.origLen; j++ {
|
||||
if m, shot := dns.PrevLabel(qname[:n], 1); shot {
|
||||
m, shot := dns.PrevLabel(qname[:n], 1)
|
||||
if shot {
|
||||
return qname, shot
|
||||
} else {
|
||||
n = m
|
||||
}
|
||||
n = m
|
||||
}
|
||||
|
||||
for j := 1; j <= i; j++ {
|
||||
m, shot := dns.PrevLabel(qname[:n], 1)
|
||||
if shot {
|
||||
return qname, shot
|
||||
} else {
|
||||
n = m
|
||||
}
|
||||
n = m
|
||||
}
|
||||
return qname[n:], false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user