ADDED:
* uuidx
FIXED:
* sprigx docs consistency
This commit is contained in:
brent saner
2026-02-11 10:21:29 -05:00
parent 67c7faf449
commit 1eea0c2672
18 changed files with 4446 additions and 1659 deletions

View File

@@ -0,0 +1,47 @@
package sprigx
import (
`net`
`net/netip`
`go4.org/netipx`
)
// netipxFromStdAddr wraps go4.org/netipx.FromStdAddr to comply with Go template requirements.
func netipxFromStdAddr(ip net.IP, port int, zone string) (addrPort netip.AddrPort, err error) {
var ok bool
if addrPort, ok = netipx.FromStdAddr(ip, port, zone); !ok {
err = ErrBadAddrPort
return
}
return
}
// netipxFromIp wraps go4.org/netipx.FromStdIP to comply with Go template requirements.
func netipxFromIp(ip net.IP) (addr netip.Addr, err error) {
var ok bool
if addr, ok = netipx.FromStdIP(ip); !ok {
err = ErrBadAddr
return
}
return
}
// netipxFromIpNet wraps go4.org/netipx.FromStdIPNet to comply with Go template requirements.
func netipxFromIpNet(ipnet *net.IPNet) (pfx netip.Prefix, err error) {
var ok bool
if pfx, ok = netipx.FromStdIPNet(ipnet); !ok {
err = ErrBadNet
return
}
return
}