View definition

func CompareDomainName

Defined in github.com/miekg/dns/labels.go

Description

CompareDomainName compares the names s1 and s2 and returns how many labels they have in common starting from the *right*. The comparison stops at the first inequality. The names are not downcased before the comparison.

www.miek.nl. and miek.nl. have two labels in common: miek and nl www.miek.nl. and www.bla.nl. have one label in common: nl

s1 and s2 must be syntactically valid domain names.

CompareDomainName is referenced in 4 repositories

github.com/miekg/dns github.com/getlantern/lantern github.com/NopullSmile/lantern

...