diff --git a/main.go b/main.go index a6522ef..425e5ec 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "sort" + "strings" "sync" log "github.com/sirupsen/logrus" @@ -105,14 +106,25 @@ func main() { } func addIfNotExists(entries []entry, e entry) []entry { + var ( + found bool + out []entry + ) + for _, pe := range entries { if pe.Domain == e.Domain { - // Entry already exists, skip - return entries + found = true + pe.Comment = strings.Join([]string{pe.Comment, e.Comment}, ", ") } + + out = append(out, pe) } - return append(entries, e) + if !found { + out = append(out, e) + } + + return out } func cleanFromList(blacklist, whitelist []entry) []entry { diff --git a/named-blacklist b/named-blacklist deleted file mode 100755 index 01de27e..0000000 Binary files a/named-blacklist and /dev/null differ