go-domain-util icon indicating copy to clipboard operation
go-domain-util copied to clipboard

handle ports

Open amlwwalker opened this issue 2 years ago • 0 comments

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 := parseUrl.Domain(domain)
	subdomain := parseUrl.Subdomain(raw)
	return strings.Join([]string{subdomain, tld}, ".")

amlwwalker avatar Jun 20 '23 12:06 amlwwalker