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

Function stringOrError

ext/guards.go:39–44  ·  view source on GitHub ↗
(str string, err error)

Source from the content-addressed store, hash-verified

37}
38
39func stringOrError(str string, err error) ref.Val {
40 if err != nil {
41 return types.NewErrFromString(err.Error())
42 }
43 return types.String(str)
44}
45
46func listStringOrError(strs []string, err error) ref.Val {
47 if err != nil {

Callers 2

CompileOptionsMethod · 0.85
CompileOptionsMethod · 0.85

Calls 3

NewErrFromStringFunction · 0.92
StringTypeAlias · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected