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

Function SimpleVariables

policy/parser.go:498–503  ·  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

496// - name: baz
497// expression: qux
498func SimpleVariables() ParserOption {
499 return func(p *Parser) (*Parser, error) {
500 p.inlineStyleVariables = true
501 return p, nil
502 }
503}
504
505// CustomTagVisitor configures the parser to use the given TagVisitor for handling custom tags.
506func CustomTagVisitor(visitor TagVisitor) ParserOption {

Callers 1

TestSimpleVariablesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSimpleVariablesFunction · 0.68