MCPcopy Create free account
hub / github.com/aws-cloudformation/rain / processAddedSections

Function processAddedSections

cft/pkg/module.go:605–647  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

603// in either the Rain section (backwards comapatibility) or
604// if they are at the top level (like the AWS CLI)
605func 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}

Callers 2

processModuleFunction · 0.85
TemplateFunction · 0.85

Calls 6

processConstantsFunction · 0.85
processPackagesFunction · 0.85
processModulesSectionFunction · 0.85
FnJoinFunction · 0.85
FnSelectFunction · 0.85
FnInsertFileFunction · 0.85

Tested by

no test coverage detected