MCPcopy Create free account
hub / github.com/encodeous/nylon / AddrToPrefix

Function AddrToPrefix

state/validation.go:66–75  ·  view source on GitHub ↗
(addr netip.Addr)

Source from the content-addressed store, hash-verified

64}
65
66func AddrToPrefix(addr netip.Addr) netip.Prefix {
67 res, err := addr.Prefix(addr.BitLen())
68 if err != nil {
69 panic(err)
70 }
71 if !res.IsValid() {
72 panic("invalid prefix")
73 }
74 return res
75}
76
77func CentralConfigValidator(cfg *CentralCfg) error {
78 nodes := make([]string, 0)

Callers 3

ConfigureAliasFunction · 0.92
RemoveAliasFunction · 0.92
ExpandCentralConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected