func (t *Tree) Match(owner string) interface{} {
	_, node, match := t.getnode(owner)
	switch x := node.(type) {
	case indexnode:
		return match
	case mixednode:
		return x.data
	default:
		if node != nil {
			return node
		}

		return match
	}
}
// Match returns the data associated with the largest part of owner or nil if
// there are none.
//
// If the tree "map" contains
//  "www.example.com.": "www-example-com"
//  "example.org.": "www-example-org"
// then
//  t.Match(".") == nil
//  t.Match("com.") == nil
//  t.Match("example.com.") == nil
//  t.Match("www.example.com.") == "www-example-com"
//  t.Match("ns.www.example.com.") == "www-example-com"
//  t.Match("org.") == nil
//  t.Match("example.org.") == "www-example-org"
//  t.Match("www.example.org.") == "www-example-org"
//
// In other words, Match returns the most recent (last seen) data item present
// in the tree when walking the DNS name hiearchy.
Match returns the data associated with the largest part of owner or nil if
there are none.



In other words, Match returns the most recent (last seen) data item present
in the tree when walking the DNS name hiearchy.
// Match returns the data associated with the largest part of owner or nil if // there are none . // // If the tree " map " contains // " www . example . com . " : " www - example - com " // " example . org . " : " www - example - org " // then // t . Match ( " . " ) == nil // t . Match ( " com . " ) == nil // t . Match ( " example . com . " ) == nil // t . Match ( " www . example . com . " ) == " www - example - com " // t . Match ( " ns . www . example . com . " ) == " www - example - com " // t . Match ( " org . " ) == nil // t . Match ( " example . org . " ) == " www - example - org " // t . Match ( " www . example . org . " ) == " www - example - org " // // In other words Match returns the most recent ( last seen ) data item present // in the tree when walking the DNS name hiearchy .
func (t *Tree) Match(owner string) interface{} {
	_, node, match := t.getnode(owner)
	switch x := node.(type) {
	case indexnode:
		return match
	case mixednode:
		return x.data
	default:
		if node != nil {
			return node
		}
		return match
	}
}
func ( t * Tree ) Match ( owner string ) interface { } { _ , node , match := t . getnode ( owner ) switch x := node . ( type ) { case indexnode : return match case mixednode : return x . data default : if node != nil { return node } return match } }
Match returns the data associated with the largest part of owner or nil if
there are none.
Match returns the data associated with the largest part of owner or nil if there are none .