Documentation ¶
Overview ¶
Package ipnet provides some useful methods to handle net.IPNet lists
Index ¶
- func DedupSorted(nets []*net.IPNet) []*net.IPNet
- func Less(a, b *net.IPNet) bool
- func MergeByRepeat(nets []*net.IPNet) []*net.IPNet
- func MergePairs(nets []*net.IPNet) []*net.IPNet
- func MergeSorted(nets []*net.IPNet) []*net.IPNet
- func MergeSortedByRepeat(nets []*net.IPNet) []*net.IPNet
- func Sort(nets []*net.IPNet) []*net.IPNet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DedupSorted ¶
DedupSorted removes all the identical or included-in-bigger-one-presented sublens from the list
func MergeByRepeat ¶
MergeByRepeat is a wrapper around MergeSorted
func MergePairs ¶
MergePairs merges all the suitable pairs of subnets in the net.IPNet list
func MergeSorted ¶
MergeSorted is merging previously sorted and de-duped list of net.IPNet to the smallest possible form
func MergeSortedByRepeat ¶
MergeSortedByRepeat is repeating MergePairs as long as it does merge anything
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.