MCPcopy Create free account
hub / github.com/cel-expr/cel-go / netCIDRIsMask

Function netCIDRIsMask

ext/network.go:475–478  ·  view source on GitHub ↗
(val ref.Val)

Source from the content-addressed store, hash-verified

473}
474
475func netCIDRIsMask(val ref.Val) ref.Val {
476 cidr := val.(CIDR)
477 return types.Bool(cidr.Prefix.Addr() == cidr.Prefix.Masked().Addr())
478}
479
480func parseCIDR(raw string) (netip.Prefix, error) {
481 prefix, err := netip.ParsePrefix(raw)

Callers

nothing calls this directly

Calls 1

BoolTypeAlias · 0.92

Tested by

no test coverage detected