func (f *zoneFilter) EndpointZoneID(endpoint *endpoint.Endpoint, zones map[int64]string) (zoneID int64, name string) {
	var matchZoneID int64
	var matchZoneName string
	for zoneID, zoneName := range zones {
		if strings.HasSuffix(endpoint.DNSName, "."+zoneName) && len(zoneName) > len(matchZoneName) {
			matchZoneName = zoneName
			matchZoneID = zoneID
			name = strings.TrimSuffix(endpoint.DNSName, "."+zoneName)
		}
	}
	return matchZoneID, name
}
func (f *zoneFilter) EndpointZoneID(endpoint *endpoint.Endpoint, zones map[int64]string) (zoneID int64, name string) {
	var matchZoneID int64
	var matchZoneName string
	for zoneID, zoneName := range zones {
		if strings.HasSuffix(endpoint.DNSName, "."+zoneName) && len(zoneName) > len(matchZoneName) {
			matchZoneName = zoneName
			matchZoneID = zoneID
			name = strings.TrimSuffix(endpoint.DNSName, "."+zoneName)
		}
	}
	return matchZoneID, name
}
func ( f * zoneFilter ) EndpointZoneID ( endpoint * endpoint . Endpoint , zones map [ int64 ] string ) ( zoneID int64 , name string ) { var matchZoneID int64 var matchZoneName string for zoneID , zoneName := range zones { if strings . HasSuffix ( endpoint . DNSName , " " + zoneName ) && len ( zoneName ) > len ( matchZoneName ) { matchZoneName = zoneName matchZoneID = zoneID name = strings . TrimSuffix ( endpoint . DNSName , " " + zoneName ) } } return matchZoneID , name }
// EndpointZoneID determines zoneID for endpoint from map[zoneID]zoneName by taking longest suffix zoneName match in endpoint DNSName
// returns 0 if no matches are found
EndpointZoneID determines zoneID for endpoint from map [ zoneID ] zoneName by taking longest suffix zoneName match in endpoint DNSName returns 0 if no matches are found