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

Method GetExplanationOutputPolicy

policy/parser.go:154–166  ·  view source on GitHub ↗

GetExplanationOutputPolicy returns a copy of the policy, except the output of each match block is replaced by the expression in the explanation field.

()

Source from the content-addressed store, hash-verified

152// GetExplanationOutputPolicy returns a copy of the policy, except the output of each match block
153// is replaced by the expression in the explanation field.
154func (p *Policy) GetExplanationOutputPolicy() *Policy {
155 ep := Policy{
156 name: p.name,
157 semantic: p.semantic,
158 info: p.info,
159 metadata: p.metadata,
160 source: p.source,
161 }
162 if p.rule != nil {
163 ep.rule = p.rule.getExplanationOutputRule()
164 }
165 return &ep
166}
167
168// NewImport creates a new typename import node
169func NewImport(exprID int64) *Import {

Callers 1

Calls 1

Tested by 1