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

Function netIPIsCanonical

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

Source from the content-addressed store, hash-verified

384}
385
386func netIPIsCanonical(val ref.Val) ref.Val {
387 s := val.(types.String)
388 str := string(s)
389 addr, err := parseIPAddr(str)
390 if err != nil {
391 return types.WrapErr(err)
392 }
393 return types.Bool(addr.String() == str)
394}
395
396func netIPIsGlobalUnicast(val ref.Val) ref.Val {
397 ip := val.(IP)

Callers

nothing calls this directly

Calls 4

WrapErrFunction · 0.92
BoolTypeAlias · 0.92
parseIPAddrFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected