Skip to content

v1.0.2

Choose a tag to compare

@zxdev zxdev released this 20 Apr 19:02
· 8 commits to main since this release

Adds the compare method for domains.

// Compare is a boolean comparison test for Apex and Host hostnames; the
// Apex form will always be empty on the parser failure or when an IP is
// detected so this sould only be used with domains
func (u *URL) Compare() bool {
	return len(u.Apex) > 0 && len(u.Host) == len(u.Apex)
}