func ScopeMatchPublic(addr Address) ScopeMatch {
	switch addr.AddressScope() {
	case ScopePublic:
		if addr.AddressType() == IPv4Address {
			return exactScopeIPv4
		}
		return exactScope
	case ScopeCloudLocal:
		if addr.AddressType() == IPv4Address {
			return firstFallbackScopeIPv4
		}
		return firstFallbackScope
	case ScopeFanLocal, ScopeUnknown:
		if addr.AddressType() == IPv4Address {
			return secondFallbackScopeIPv4
		}
		return secondFallbackScope
	}
	return invalidScope
}
// ScopeMatchPublic is an address scope matching function for determining the
// extent to which the input address' scope satisfies a requirement for public
// accessibility.
ScopeMatchPublic is an address scope matching function for determining the
extent to which the input address' scope satisfies a requirement for public
accessibility.
// ScopeMatchPublic is an address scope matching function for determining the // extent to which the input address ' scope satisfies a requirement for public // accessibility .
func ScopeMatchPublic(addr Address) ScopeMatch {
	switch addr.AddressScope() {
	case ScopePublic:
		if addr.AddressType() == IPv4Address {
			return exactScopeIPv4
		}
		return exactScope
	case ScopeCloudLocal:
		if addr.AddressType() == IPv4Address {
			return firstFallbackScopeIPv4
		}
		return firstFallbackScope
	case ScopeFanLocal, ScopeUnknown:
		if addr.AddressType() == IPv4Address {
			return secondFallbackScopeIPv4
		}
		return secondFallbackScope
	}
	return invalidScope
}
func ScopeMatchPublic ( addr Address ) ScopeMatch { switch addr . AddressScope ( ) { case ScopePublic : if addr . AddressType ( ) == IPv4Address { return exactScopeIPv4 } return exactScope case ScopeCloudLocal : if addr . AddressType ( ) == IPv4Address { return firstFallbackScopeIPv4 } return firstFallbackScope case ScopeFanLocal , ScopeUnknown : if addr . AddressType ( ) == IPv4Address { return secondFallbackScopeIPv4 } return secondFallbackScope } return invalidScope }
ScopeMatchPublic is an address scope matching function for determining the
extent to which the input address' scope satisfies a requirement for public
accessibility.
ScopeMatchPublic is an address scope matching function for determining the extent to which the input address ' scope satisfies a requirement for public accessibility .