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

Method GetExplanationOutputPolicy

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

134// GetExplanationOutputPolicy returns a copy of the policy, except the output of each match block
135// is replaced by the expression in the explanation field.
136func (p *Policy) GetExplanationOutputPolicy() *Policy {
137 ep := Policy{
138 name: p.name,
139 semantic: p.semantic,
140 info: p.info,
141 metadata: p.metadata,
142 source: p.source,
143 }
144 if p.rule != nil {
145 ep.rule = p.rule.getExplanationOutputRule()
146 }
147 return &ep
148}
149
150// NewImport creates a new typename import node
151func NewImport(exprID int64) *Import {

Callers 1

Calls 1

Tested by 1