func validateAddress(address string) error {
	// first check if address is an IP address
	if parsedAddr := net.ParseIP(address); parsedAddr != nil {
		if parsedAddr.To4() != nil {
			return nil
		}
		// if the address parses into an IP but is not ipv4 it must be ipv6
		return errors.Errorf("ipv6 is not supported")
	}
	// Do a check that the DNS provided is valid
	addressList, err := net.LookupHost(address)
	if err != nil {
		return errors.Wrapf(err, "error looking up DNS")
	}
	if len(addressList) == 0 {
		return errors.Errorf("DNS did not resolve to an address")
	}
	return nil
}
// validateAddress checks that the given address is either an ipv4 address, or resolves to any ip address
validateAddress checks that the given address is either an ipv4 address, or resolves to any ip address
// validateAddress checks that the given address is either an ipv4 address or resolves to any ip address
func validateAddress(address string) error {
	if parsedAddr := net.ParseIP(address); parsedAddr != nil {
		if parsedAddr.To4() != nil {
			return nil
		}
		return errors.Errorf("ipv6 is not supported")
	}
	addressList, err := net.LookupHost(address)
	if err != nil {
		return errors.Wrapf(err, "error looking up DNS")
	}
	if len(addressList) == 0 {
		return errors.Errorf("DNS did not resolve to an address")
	}
	return nil
}
func validateAddress ( address string ) error { if parsedAddr := net . ParseIP ( address ) ; parsedAddr != nil { if parsedAddr . To4 ( ) != nil { return nil } return errors . Errorf ( " " ) } addressList , err := net . LookupHost ( address ) if err != nil { return errors . Wrapf ( err , " " ) } if len ( addressList ) == 0 { return errors . Errorf ( " " ) } return nil }
validateAddress checks that the given address is either an ipv4 address, or resolves to any ip address
validateAddress checks that the given address is either an ipv4 address or resolves to any ip address
// first check if address is an IP address // if the address parses into an IP but is not ipv4 it must be ipv6 // Do a check that the DNS provided is valid