From 943ba1e819ff784d24090f118eba587815b0f5ae Mon Sep 17 00:00:00 2001 From: nhyatt Date: Fri, 27 Jun 2025 17:35:27 -0500 Subject: [PATCH] corrects incorrectly scoped continue --- cmd/bind/cleanup.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/bind/cleanup.go b/cmd/bind/cleanup.go index 58180bc..4cf0038 100644 --- a/cmd/bind/cleanup.go +++ b/cmd/bind/cleanup.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "regexp" "sort" @@ -28,21 +29,30 @@ func cleanBadDomains(domains []string) []string { // remove duplicates domains = removeDuplicateStr(domains) + fmt.Printf("Processing: \n") + for _, domain := range domains { // removing trailing dots domain = regexp.MustCompile(`\.$`).ReplaceAllString(domain, "") // skip domains that are too long if len([]rune(domain)) > 230 { + fmt.Printf("-") continue } // skip domains that are allowed + var skip bool for _, allowRegex := range cfg.ConfigFile.AllowLists { if regexp.MustCompile(allowRegex).MatchString(domain) { + skip = true continue } } + if skip { + fmt.Printf(".") + continue + } // add domain cleanDomains = append(cleanDomains, domain)