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

Function intOrError

ext/guards.go:25–30  ·  view source on GitHub ↗

function invocation guards for common call signatures within extension functions.

(i int64, err error)

Source from the content-addressed store, hash-verified

23// function invocation guards for common call signatures within extension functions.
24
25func intOrError(i int64, err error) ref.Val {
26 if err != nil {
27 return types.NewErrFromString(err.Error())
28 }
29 return types.Int(i)
30}
31
32func bytesOrError(bytes []byte, err error) ref.Val {
33 if err != nil {

Callers 1

CompileOptionsMethod · 0.85

Calls 3

NewErrFromStringFunction · 0.92
IntTypeAlias · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected