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

Function listStringOrError

ext/guards.go:46–51  ·  view source on GitHub ↗
(strs []string, err error)

Source from the content-addressed store, hash-verified

44}
45
46func listStringOrError(strs []string, err error) ref.Val {
47 if err != nil {
48 return types.NewErrFromString(err.Error())
49 }
50 return types.DefaultTypeAdapter.NativeToValue(strs)
51}
52
53func extractIdent(target ast.Expr) (string, bool) {
54 switch target.Kind() {

Callers 1

CompileOptionsMethod · 0.85

Calls 3

NewErrFromStringFunction · 0.92
NativeToValueMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected