(src *Source, docNode *yaml.Node)
| 564 | } |
| 565 | |
| 566 | func sourceToYAML(src *Source, docNode *yaml.Node) error { |
| 567 | err := yaml.Unmarshal([]byte(src.Content()), docNode) |
| 568 | if err != nil { |
| 569 | return err |
| 570 | } |
| 571 | if docNode.Kind != yaml.DocumentNode { |
| 572 | return fmt.Errorf("got yaml node of kind %v, wanted mapping node", docNode.Kind) |
| 573 | } |
| 574 | return nil |
| 575 | } |
| 576 | |
| 577 | func newParserImpl(visitor TagVisitor, info *ast.SourceInfo, src *Source, iss *cel.Issues, arrayStyleVariables bool) *parserImpl { |
| 578 | return &parserImpl{ |