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

Function netCIDRString

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

Source from the content-addressed store, hash-verified

361}
362
363func netCIDRString(val ref.Val) ref.Val {
364 s := val.(types.String)
365 str := string(s)
366 prefix, err := parseCIDR(str)
367 if err != nil {
368 return types.WrapErr(err)
369 }
370 return CIDR{Prefix: prefix}
371}
372
373func netCIDRToString(val ref.Val) ref.Val {
374 cidr := val.(CIDR)

Callers

nothing calls this directly

Calls 2

WrapErrFunction · 0.92
parseCIDRFunction · 0.85

Tested by

no test coverage detected