// AsAddress translates IPOrDomain to Address.
AsAddress translates IPOrDomain to Address.
// AsAddress translates IPOrDomain to Address .
func (d *IPOrDomain) AsAddress() Address {
	if d == nil {
		return nil
	}
	switch addr := d.Address.(type) {
	case *IPOrDomain_Ip:
		return IPAddress(addr.Ip)
	case *IPOrDomain_Domain:
		return DomainAddress(addr.Domain)
	}
	panic("Common|Net: Invalid address.")
}
func ( d * IPOrDomain ) AsAddress ( ) Address { if d == nil { return nil } switch addr := d . Address . ( type ) { case * IPOrDomain_Ip : return IPAddress ( addr . Ip ) case * IPOrDomain_Domain : return DomainAddress ( addr . Domain ) } panic ( " " ) }
AsAddress translates IPOrDomain to Address.
AsAddress translates IPOrDomain to Address .