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

Function SimpleVariables

policy/parser.go:540–545  ·  view source on GitHub ↗

SimpleVariables configures the parser to allow for key-value pairs to declare a variable name and expression. For example: variables: - foo: bar - baz: qux This is in contrast to the default behavior, which requires the following syntax: variables: - name: foo expression: bar

()

Source from the content-addressed store, hash-verified

538// - name: baz
539// expression: qux
540func SimpleVariables() ParserOption {
541 return func(p *Parser) (*Parser, error) {
542 p.inlineStyleVariables = true
543 return p, nil
544 }
545}
546
547// CustomTagVisitor configures the parser to use the given TagVisitor for handling custom tags.
548func CustomTagVisitor(visitor TagVisitor) ParserOption {

Callers 1

TestSimpleVariablesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSimpleVariablesFunction · 0.68