go-domain-util
go-domain-util copied to clipboard
Validate domain patterns
Hello again,
I have added isDomainName function. This will validate the domain name using the isDomainName function from golangs DNS lib. So this should be very solid. This function does not have public scope. That's why I had to copy it.
I recognized the same issues as described in #12 This will also validate host names in emails (such as [email protected]). This is because of the stripURLParts call before checking the domain name.
[email protected] will not fail the validation.
Cheers
Hi, I just stumbled across this enhancement and it is also relevant for me tbh to verify whether I'm working with a valid domain name. Is there any reason not to include this PR into the utils?
Maintainers seem to be inactive. Better create your own fork or checkout mine. https://github.com/gohumble/go-domain-util