this is cool and all but the tables don't render properly

This commit is contained in:
2025-02-01 23:15:54 -05:00
parent b09cb83017
commit 3a7ed5973b
28 changed files with 1917 additions and 88 deletions

View File

@@ -1,12 +1,18 @@
package netsplit
import (
"go4.org/netipx"
"net/netip"
"sort"
"go4.org/netipx"
)
// Split splits the network defined in a VLSMSplitter alongside its configuration and performs the subnetting.
/*
Split splits the network defined in a VLSMSplitter alongside its configuration and performs the subnetting.
This strategy allows for multiple subnets of differing sizes to be specified.
remaining may or may not be nil depending on if all desired subnet sizes fit cleanly into the network boundaries.
*/
func (v *VLSMSplitter) Split() (nets []*netip.Prefix, remaining *netipx.IPSet, err error) {
var ok bool
@@ -15,7 +21,7 @@ func (v *VLSMSplitter) Split() (nets []*netip.Prefix, remaining *netipx.IPSet, e
var base netip.Prefix
var sub netip.Prefix
var subPtr *netip.Prefix
var ipsb *netipx.IPSetBuilder = new(netipx.IPSetBuilder)
var ipsb = new(netipx.IPSetBuilder)
if err = ValidateSizes(v.network, v.PrefixLengths...); err != nil {
return