func (f ZoneTypeFilter) Match(zone *route53.HostedZone) bool {
	// An empty zone filter includes all hosted zones.
	if f.zoneType == "" {
		return true
	}

	// If the zone has no config we assume it's a public zone since the config's field
	// `PrivateZone` is false by default in go.
	if zone.Config == nil {
		return f.zoneType == zoneTypePublic
	}

	// Given a zone type we return true if the given zone matches this type.
	switch f.zoneType {
	case zoneTypePublic:
		return !aws.BoolValue(zone.Config.PrivateZone)
	case zoneTypePrivate:
		return aws.BoolValue(zone.Config.PrivateZone)
	}

	// We return false on any other path, e.g. unknown zone type filter value.
	return false
}
func (f ZoneTypeFilter) Match(zone *route53.HostedZone) bool {
	// An empty zone filter includes all hosted zones.
	if f.zoneType == "" {
		return true
	}

	// If the zone has no config we assume it's a public zone since the config's field
	// `PrivateZone` is false by default in go.
	if zone.Config == nil {
		return f.zoneType == zoneTypePublic
	}

	// Given a zone type we return true if the given zone matches this type.
	switch f.zoneType {
	case zoneTypePublic:
		return !aws.BoolValue(zone.Config.PrivateZone)
	case zoneTypePrivate:
		return aws.BoolValue(zone.Config.PrivateZone)
	}

	// We return false on any other path, e.g. unknown zone type filter value.
	return false
}
func ( f ZoneTypeFilter ) Match ( zone * route53 . HostedZone ) bool { // An empty zone filter includes all hosted zones. if f . zoneType == " " { return true } // If the zone has no config we assume it's a public zone since the config's field // `PrivateZone` is false by default in go. if zone . Config == nil { return f . zoneType == zoneTypePublic } // Given a zone type we return true if the given zone matches this type. switch f . zoneType { case zoneTypePublic : return ! aws . BoolValue ( zone . Config . PrivateZone ) case zoneTypePrivate : return aws . BoolValue ( zone . Config . PrivateZone ) } // We return false on any other path, e.g. unknown zone type filter value. return false }
// Match checks whether a zone matches the zone type that's filtered for.
Match checks whether a zone matches the zone type that s filtered for .