go-domain-util
go-domain-util copied to clipboard
GOlang package for checking if url contains subdomain, what that subdomain is, what is a top level domain in url etc.
For url like _https:\\\yandex.ru_ we get scheme with domain scheme = "https" **domain = "https:\\\yandex.ru"** domainSuffix = "ru" **domainPrefix = "https:\\\yandex"** But for url like _https:\\\fff.yandex.ru_, scheme is absent scheme...
These domains bypass the plug-in for some reason. d228z91au11ukj.cloudfront.net *.cloudfront.net global.fastly.net *.map.fastly.net us-west-2.elb.amazonaws.com avatars0.githubusercontent.com avatars*.githubusercontent.com fonts.googleapis.com telephonyspamprotect-pa.googleapis.com, 
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...
Test: `fmt.Println(domainutil.Domain("test.localhost"))` outputs nothing.
Thanks for the awesome utility :clap:! Currently the site medium uses urls like `medium.com/@user/article` [example](https://medium.com/@Policy4.0/why-indias-supreme-court-ruling-won-t-change-the-fate-of-cryptocurrencies-decisively-24549674b13b). Currently an empty string is returned by `Domain()` for all of them. I just swapped...
Just wanted to add some observations. Given package is working awesome, just apart from some basic things. 1. If we pass email id as domain its accepting and validating as...
Reopened this PR on different branch. I do processing decisions based on the number of subdomains. For this purpose I'm using the Splitdomain() function and checking the number of subdomains...
I see that this tld list is long time no update
Currently this gets stuck on ports: this test fails: ``` domain: "http://user:[email protected]:8080/path/somewhere", expected: "sub.subdomain.example.com", ``` and so does ``` { domain: "http://user:[email protected]:8080", expected: "sub.subdomain.example.com", }, ``` when running ``` tld...