processAddedSections can be used for Constants and Modules in either the Rain section (backwards comapatibility) or if they are at the top level (like the AWS CLI)
( t *cft.Template, n *yaml.Node, rootDir string, fs *embed.FS, parentModule *Module)
| 603 | // in either the Rain section (backwards comapatibility) or |
| 604 | // if they are at the top level (like the AWS CLI) |
| 605 | func processAddedSections( |
| 606 | t *cft.Template, n *yaml.Node, rootDir string, fs *embed.FS, parentModule *Module) error { |
| 607 | |
| 608 | var err error |
| 609 | |
| 610 | err = processConstants(t, n) |
| 611 | if err != nil { |
| 612 | return err |
| 613 | } |
| 614 | err = processPackages(t, n) |
| 615 | if err != nil { |
| 616 | return err |
| 617 | } |
| 618 | |
| 619 | err = processModulesSection(t, n, rootDir, fs, parentModule) |
| 620 | if err != nil { |
| 621 | return err |
| 622 | } |
| 623 | |
| 624 | if parentModule == nil { |
| 625 | |
| 626 | err = FnJoin(n) |
| 627 | if err != nil { |
| 628 | return err |
| 629 | } |
| 630 | |
| 631 | // Putting Merge here breaks it, since it merges unresolved Refs... |
| 632 | // TODO: Need to make sure Merge doesn't run until the very end.. |
| 633 | |
| 634 | err = FnSelect(n) |
| 635 | if err != nil { |
| 636 | return err |
| 637 | } |
| 638 | |
| 639 | err = FnInsertFile(n, rootDir) |
| 640 | if err != nil { |
| 641 | return err |
| 642 | } |
| 643 | |
| 644 | } |
| 645 | |
| 646 | return nil |
| 647 | } |
no test coverage detected