jpillora / go-tld

TLD Parser in Go
MIT License
127 stars 19 forks source link

Support domains that dont begin with http:// - https:// #5

Closed ChadTaljaardt closed 5 years ago

ChadTaljaardt commented 5 years ago

Is there a way i can parse a domain such as example.google.com

jpillora commented 5 years ago

Unfortunately not

The tld package has the same API as net/url

You can do this instead:

u, err := tld.Parse("http://" + hostname)