this is cool and all but the tables don't render properly
This commit is contained in:
@@ -4,11 +4,12 @@ import (
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"github.com/goccy/go-yaml"
|
||||
"go4.org/netipx"
|
||||
"net"
|
||||
"net/netip"
|
||||
"strings"
|
||||
|
||||
"github.com/goccy/go-yaml"
|
||||
"go4.org/netipx"
|
||||
)
|
||||
|
||||
/*
|
||||
@@ -96,9 +97,9 @@ Set as 0 or `segSep` to an empty string to do no string segmentation.
|
||||
func AddrFmt(ip netip.Addr, f, sep, segSep string, every, everySeg uint) (s string) {
|
||||
|
||||
var numSegs int
|
||||
var doSep bool = every > 0
|
||||
var fs string = "%" + f
|
||||
var sb *strings.Builder = new(strings.Builder)
|
||||
var doSep = every > 0
|
||||
var fs = "%" + f
|
||||
var sb = new(strings.Builder)
|
||||
|
||||
if ip.IsUnspecified() || !ip.IsValid() {
|
||||
return
|
||||
@@ -152,7 +153,7 @@ func AddrInvert(ip netip.Addr) (inverted netip.Addr) {
|
||||
func Contain(origPfx *netip.Prefix, nets []*netip.Prefix, remaining *netipx.IPSet, splitter NetSplitter) (s *StructuredResults, err error) {
|
||||
|
||||
var rem []netip.Prefix
|
||||
var sr StructuredResults = StructuredResults{
|
||||
var sr = StructuredResults{
|
||||
Original: origPfx,
|
||||
}
|
||||
|
||||
@@ -243,9 +244,9 @@ Its parameters hold the same significance as in AddrFmt.
|
||||
func MaskFmt(mask net.IPMask, f, sep, segSep string, every, everySeg uint) (s string) {
|
||||
|
||||
var numSegs int
|
||||
var doSep bool = every > 0
|
||||
var fs string = "%" + f
|
||||
var sb *strings.Builder = new(strings.Builder)
|
||||
var doSep = every > 0
|
||||
var fs = "%" + f
|
||||
var sb = new(strings.Builder)
|
||||
|
||||
if mask == nil || len(mask) == 0 {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user