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

Function normalizeEntry

policy/parser.go:544–552  ·  view source on GitHub ↗

normalizeEntry extracts a key, value pair as the next two elements from the content slice. val source position information is normalized depending on style.

(content []*yaml.Node, i int)

Source from the content-addressed store, hash-verified

542// normalizeEntry extracts a key, value pair as the next two elements from the
543// content slice. val source position information is normalized depending on style.
544func normalizeEntry(content []*yaml.Node, i int) (key *yaml.Node, val *yaml.Node) {
545 key = content[i]
546 val = content[i+1]
547 if val.Style == yaml.FoldedStyle || val.Style == yaml.LiteralStyle {
548 val.Line++
549 val.Column = key.Column + 1
550 }
551 return key, val
552}
553
554func (p *parserImpl) parseYAML(src *Source) *Policy {
555 // Parse yaml representation from the source to an object model.

Callers 1

RangeMapMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected