Maint: rename files in internal/subnet
This commit is contained in:
7
internal/subnet/equal.go
Normal file
7
internal/subnet/equal.go
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
package subnet
|
||||||
|
|
||||||
|
import "net"
|
||||||
|
|
||||||
|
func subnetsAreEqual(a, b net.IPNet) bool {
|
||||||
|
return a.IP.Equal(b.IP) && a.Mask.String() == b.Mask.String()
|
||||||
|
}
|
||||||
@@ -42,10 +42,6 @@ func findSubnetsToRemove(oldSubnets, newSubnets []net.IPNet) (subnetsToRemove []
|
|||||||
return subnetsToRemove
|
return subnetsToRemove
|
||||||
}
|
}
|
||||||
|
|
||||||
func subnetsAreEqual(a, b net.IPNet) bool {
|
|
||||||
return a.IP.Equal(b.IP) && a.Mask.String() == b.Mask.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
func RemoveSubnetFromSubnets(subnets []net.IPNet, subnet net.IPNet) []net.IPNet {
|
func RemoveSubnetFromSubnets(subnets []net.IPNet, subnet net.IPNet) []net.IPNet {
|
||||||
L := len(subnets)
|
L := len(subnets)
|
||||||
for i := range subnets {
|
for i := range subnets {
|
||||||
Reference in New Issue
Block a user