func (s *netPackageConfigSource) Interfaces() ([]ConfigSourceNIC, error) {
	nics, err := s.interfaces()
	if err != nil {
		return nil, errors.Trace(err)
	}

	parseType := func(name string) LinkLayerDeviceType { return ParseInterfaceType(s.sysClassNetPath, name) }
	result := make([]ConfigSourceNIC, len(nics))
	for i := range nics {
		// Close over the sysClassNetPath so that
		// the NIC needs to know nothing about it.
		result[i] = newNetNIC(&nics[i], parseType)
	}
	return result, nil
}
// Interfaces returns the network interfaces on the machine.
Interfaces returns the network interfaces on the machine.
// Interfaces returns the network interfaces on the machine .
func (s *netPackageConfigSource) Interfaces() ([]ConfigSourceNIC, error) {
	nics, err := s.interfaces()
	if err != nil {
		return nil, errors.Trace(err)
	}
	parseType := func(name string) LinkLayerDeviceType { return ParseInterfaceType(s.sysClassNetPath, name) }
	result := make([]ConfigSourceNIC, len(nics))
	for i := range nics {
		result[i] = newNetNIC(&nics[i], parseType)
	}
	return result, nil
}
func ( s * netPackageConfigSource ) Interfaces ( ) ( [ ] ConfigSourceNIC , error ) { nics , err := s . interfaces ( ) if err != nil { return nil , errors . Trace ( err ) } parseType := func ( name string ) LinkLayerDeviceType { return ParseInterfaceType ( s . sysClassNetPath , name ) } result := make ( [ ] ConfigSourceNIC , len ( nics ) ) for i := range nics { result [ i ] = newNetNIC ( & nics [ i ] , parseType ) } return result , nil }
Interfaces returns the network interfaces on the machine.
Interfaces returns the network interfaces on the machine .
// Close over the sysClassNetPath so that // the NIC needs to know nothing about it.