From a65f013b6bcd754369f47e282d3c858addcd1943 Mon Sep 17 00:00:00 2001 From: Dimitrios Karagiannis Date: Fri, 24 Nov 2017 16:11:11 +0000 Subject: [PATCH] consolidate if blocks --- registrator.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/registrator.go b/registrator.go index 752b51e..b6c92f9 100644 --- a/registrator.go +++ b/registrator.go @@ -293,9 +293,7 @@ func (r *registrator) pruneBatch(action string, records []cnameRecord) []cnameRe o := r.ingressWatcher.HostnameOwners(u.Hostname) if len(o) > 0 { log.Printf("[DEBUG] will not delete record %s because it's still claimed by: %s", u.Hostname, strings.Join(o, ",")) - break - } - if err == nil { + } else if err == nil { pruned = append(pruned, u) } else if err != errDNSEmptyAnswer { log.Printf("[DEBUG] error resolving %s: %+v, will try to delete the record", u.Hostname, err)