func (n *netNIC) Addresses() ([]ConfigSourceAddr, error) {
	addrs, err := n.nic.Addrs()
	if err != nil {
		return nil, errors.Trace(err)
	}

	result := make([]ConfigSourceAddr, 0, len(addrs))
	for _, addr := range addrs {
		if addr.String() != "" {
			a, err := newNetAddr(addr.String())
			if err != nil {
				return nil, errors.Trace(err)
			}

			result = append(result, a)
		}
	}
	return result, nil
}
// Addresses returns all IP addresses associated with the device.
Addresses returns all IP addresses associated with the device.
// Addresses returns all IP addresses associated with the device .
func (n *netNIC) Addresses() ([]ConfigSourceAddr, error) {
	addrs, err := n.nic.Addrs()
	if err != nil {
		return nil, errors.Trace(err)
	}
	result := make([]ConfigSourceAddr, 0, len(addrs))
	for _, addr := range addrs {
		if addr.String() != "" {
			a, err := newNetAddr(addr.String())
			if err != nil {
				return nil, errors.Trace(err)
			}
			result = append(result, a)
		}
	}
	return result, nil
}
func ( n * netNIC ) Addresses ( ) ( [ ] ConfigSourceAddr , error ) { addrs , err := n . nic . Addrs ( ) if err != nil { return nil , errors . Trace ( err ) } result := make ( [ ] ConfigSourceAddr , 0 , len ( addrs ) ) for _ , addr := range addrs { if addr . String ( ) != " " { a , err := newNetAddr ( addr . String ( ) ) if err != nil { return nil , errors . Trace ( err ) } result = append ( result , a ) } } return result , nil }
Addresses returns all IP addresses associated with the device.
Addresses returns all IP addresses associated with the device .