func GetAddress(addresses []core.NodeAddress) (string, error) {
	for _, addr := range addresses {
		if addr.Type == core.NodeInternalIP || addr.Type == core.NodeInternalDNS {
			// filter out ipv6
			if net.ParseIP(addr.Address) != nil && net.ParseIP(addr.Address).To4() == nil {
				continue
			}
			return addr.Address, nil
		}
	}
	return "", errors.New("no usable address")
}
// GetAddress returns a non-ipv6 address that can be used to reach a Windows node. This can be either an ipv4
// or dns address.
GetAddress returns a non-ipv6 address that can be used to reach a Windows node. This can be either an ipv4
or dns address.
// GetAddress returns a non - ipv6 address that can be used to reach a Windows node . This can be either an ipv4 // or dns address .
func GetAddress(addresses []core.NodeAddress) (string, error) {
	for _, addr := range addresses {
		if addr.Type == core.NodeInternalIP || addr.Type == core.NodeInternalDNS {
			if net.ParseIP(addr.Address) != nil && net.ParseIP(addr.Address).To4() == nil {
				continue
			}
			return addr.Address, nil
		}
	}
	return "", errors.New("no usable address")
}
func GetAddress ( addresses [ ] core . NodeAddress ) ( string , error ) { for _ , addr := range addresses { if addr . Type == core . NodeInternalIP || addr . Type == core . NodeInternalDNS { if net . ParseIP ( addr . Address ) != nil && net . ParseIP ( addr . Address ) . To4 ( ) == nil { continue } return addr . Address , nil } } return " " , errors . New ( " " ) }
GetAddress returns a non-ipv6 address that can be used to reach a Windows node.
GetAddress returns a non - ipv6 address that can be used to reach a Windows node .
// filter out ipv6