brute.go
func (b *bruteRanger) CoveredNetworks(network net.IPNet) ([]RangerEntry, error) {
	entries, err := b.getEntriesByVersion(network.IP)
	if err != nil {
		return nil, err
	}
	var results []RangerEntry
	testNetwork := rnet.NewNetwork(network)
	for _, entry := range entries {
		entryNetwork := rnet.NewNetwork(entry.Network())
		if testNetwork.Covers(entryNetwork) {
			results = append(results, entry)
		}
	}
	return results, nil
}
func (b *bruteRanger) CoveredNetworks(network net.IPNet) ([]RangerEntry, error) {
	entries, err := b.getEntriesByVersion(network.IP)
	if err != nil {
		return nil, err
	}
	var results []RangerEntry
	testNetwork := rnet.NewNetwork(network)
	for _, entry := range entries {
		entryNetwork := rnet.NewNetwork(entry.Network())
		if testNetwork.Covers(entryNetwork) {
			results = append(results, entry)
		}
	}
	return results, nil
}
func ( b * bruteRanger ) CoveredNetworks ( network net . IPNet ) ( [ ] RangerEntry , error ) { entries , err := b . getEntriesByVersion ( network . IP ) if err != nil { return nil , err } var results [ ] RangerEntry testNetwork := rnet . NewNetwork ( network ) for _ , entry := range entries { entryNetwork := rnet . NewNetwork ( entry . Network ( ) ) if testNetwork . Covers ( entryNetwork ) { results = append ( results , entry ) } } return results , nil }
// CoveredNetworks returns the list of RangerEntry(s) the given ipnet
// covers.  That is, the networks that are completely subsumed by the
// specified network.
CoveredNetworks returns the list of RangerEntry ( s ) the given ipnet covers . That is the networks that are completely subsumed by the specified network .