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

Function bytesOrError

ext/guards.go:32–37  ·  view source on GitHub ↗
(bytes []byte, err error)

Source from the content-addressed store, hash-verified

30}
31
32func bytesOrError(bytes []byte, err error) ref.Val {
33 if err != nil {
34 return types.NewErrFromString(err.Error())
35 }
36 return types.Bytes(bytes)
37}
38
39func stringOrError(str string, err error) ref.Val {
40 if err != nil {

Callers 1

CompileOptionsMethod · 0.85

Calls 3

NewErrFromStringFunction · 0.92
BytesTypeAlias · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected