orchid/utils/domain-checker.go

17 lines
267 B
Go
Raw Permalink Normal View History

2023-07-06 01:26:17 +01:00
package utils
2023-07-22 01:39:39 +01:00
import "github.com/1f349/violet/utils"
2023-07-06 01:26:17 +01:00
type DomainChecker []string
func (d DomainChecker) ValidateDomain(a string) bool {
if fqdn, ok := utils.GetTopFqdn(a); ok {
for _, i := range d {
if i == fqdn {
return true
}
}
}
return false
}