func (i *InterfaceInfo) PrimaryAddress() ProviderAddress {
	if len(i.Addresses) == 0 {
		return ProviderAddress{}
	}

	// We assume that the primary IP is always listed first. The majority
	// of providers only define a single IP so this will still work as
	// expected. Notably, ec2 does allow multiple private IP addresses to
	// be assigned to an interface but the provider ensures that the one
	// flagged as primary is present at index 0.
	return i.Addresses[0]
}
// PrimaryAddress returns the primary address for the interface.
PrimaryAddress returns the primary address for the interface.
// PrimaryAddress returns the primary address for the interface .
func (i *InterfaceInfo) PrimaryAddress() ProviderAddress {
	if len(i.Addresses) == 0 {
		return ProviderAddress{}
	}
	return i.Addresses[0]
}
func ( i * InterfaceInfo ) PrimaryAddress ( ) ProviderAddress { if len ( i . Addresses ) == 0 { return ProviderAddress { } } return i . Addresses [ 0 ] }
PrimaryAddress returns the primary address for the interface.
PrimaryAddress returns the primary address for the interface .
// We assume that the primary IP is always listed first. The majority // of providers only define a single IP so this will still work as // expected. Notably, ec2 does allow multiple private IP addresses to // be assigned to an interface but the provider ensures that the one // flagged as primary is present at index 0.