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

Function netIsIP

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

Source from the content-addressed store, hash-verified

493}
494
495func netIsIP(val ref.Val) ref.Val {
496 s := val.(types.String)
497 _, err := parseIPAddr(string(s))
498 return types.Bool(err == nil)
499}
500
501func netCIDRIsMask(val ref.Val) ref.Val {
502 cidr := val.(CIDR)

Callers

nothing calls this directly

Calls 2

BoolTypeAlias · 0.92
parseIPAddrFunction · 0.85

Tested by

no test coverage detected