// NewIPOrDomain translates Address to IPOrDomain
NewIPOrDomain translates Address to IPOrDomain
// NewIPOrDomain translates Address to IPOrDomain
func NewIPOrDomain(addr Address) *IPOrDomain {
	switch addr.Family() {
	case AddressFamilyDomain:
		return &IPOrDomain{
			Address: &IPOrDomain_Domain{
				Domain: addr.Domain(),
			},
		}
	case AddressFamilyIPv4, AddressFamilyIPv6:
		return &IPOrDomain{
			Address: &IPOrDomain_Ip{
				Ip: addr.IP(),
			},
		}
	default:
		panic("Unknown Address type.")
	}
}
func NewIPOrDomain ( addr Address ) * IPOrDomain { switch addr . Family ( ) { case AddressFamilyDomain : return & IPOrDomain { Address : & IPOrDomain_Domain { Domain : addr . Domain ( ) , } , } case AddressFamilyIPv4 , AddressFamilyIPv6 : return & IPOrDomain { Address : & IPOrDomain_Ip { Ip : addr . IP ( ) , } , } default : panic ( " " ) } }
NewIPOrDomain translates Address to IPOrDomain
NewIPOrDomain translates Address to IPOrDomain