Compare commits

...

2 commits

Author SHA1 Message Date
ptrcnull 9fcab8e9e1 feat: Added a few more TLDs 2021-10-08 16:26:41 +02:00
ptrcnull 7ce8dfc96d feat: Enlarged recents size 2021-10-08 16:26:25 +02:00

18
main.go
View file

@ -25,7 +25,7 @@ func main() {
}, },
} }
recent := make([]string, 20) recent := make([]string, 100)
for i := range recent { for i := range recent {
recent[i] = "" recent[i] = ""
} }
@ -47,20 +47,18 @@ func main() {
tg.SendMessage(chatId, "failed getting domains: " + err.Error()) tg.SendMessage(chatId, "failed getting domains: " + err.Error())
} }
polish := false match := false
ndc := false
for _, domain := range allDomains { for _, domain := range allDomains {
if strings.HasSuffix(domain, ".pl") { for _, tld := range []string{".pl", ".app", ".dev", ".cloud"} {
polish = true if strings.HasSuffix(domain, tld) {
match = true
}
} }
if strings.HasSuffix(domain, "ndc.pl") { if strings.HasSuffix(domain, "ndc.pl") {
ndc = true match = false
} }
} }
if !polish { if !match {
continue
}
if ndc {
continue continue
} }