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

Method NewMapEntry

cel/optimizer.go:430–432  ·  view source on GitHub ↗

NewMapEntry creates a map entry with a key and value expression and a flag to indicate whether the entry is optional. Examples: {a: b} - key: a - value: b - optional: false {?a: ?b} - key: a - value: b - optional: true

(key, value ast.Expr, isOptional bool)

Source from the content-addressed store, hash-verified

428// - value: b
429// - optional: true
430func (opt *optimizerExprFactory) NewMapEntry(key, value ast.Expr, isOptional bool) ast.EntryExpr {
431 return opt.fac.NewMapEntry(opt.nextID(), key, value, isOptional)
432}
433
434// NewHasMacro generates a test-only select expression to be included within an AST and an unexpanded
435// has() macro call signature to be inserted into the source info macro call metadata.

Callers

nothing calls this directly

Calls 2

NewMapEntryMethod · 0.65
nextIDMethod · 0.45

Tested by

no test coverage detected